Table of Contents

Class IntrospectionResponseGenerator

Namespace
Fdyay.IdentityServer.ResponseHandling
Assembly
Fdyay.IdentityServer.Core.dll

Duende's default introspection response generator, with this server's audience rule and events.

public class IntrospectionResponseGenerator : IIntrospectionResponseGenerator
Inheritance
IntrospectionResponseGenerator
Implements
Inherited Members

Constructors

IntrospectionResponseGenerator(IEventService)

Creates the generator.

public IntrospectionResponseGenerator(IEventService events)

Parameters

events IEventService

Where the introspection success and failure events go.

Properties

Events

Where the introspection events go.

protected IEventService Events { get; }

Property Value

IEventService

Methods

AreExpectedScopesPresentAsync(IntrospectionRequestValidationResult, CancellationToken)

Whether an API caller's token carries at least one of the API's scopes. Duende's.

protected virtual Task<bool> AreExpectedScopesPresentAsync(IntrospectionRequestValidationResult validationResult, CancellationToken ct)

Parameters

validationResult IntrospectionRequestValidationResult
ct CancellationToken

Returns

Task<bool>

Remarks

A token carrying none is reported inactive, and the refusal raised as this server's failure event.

ProcessAsync(IntrospectionRequestValidationResult, CancellationToken)

Builds the introspection response (RFC 7662 ยง2.2) for a validated request.

public virtual Task<Dictionary<string, object>> ProcessAsync(IntrospectionRequestValidationResult validationResult, CancellationToken ct)

Parameters

validationResult IntrospectionRequestValidationResult

The validated introspection request, with the token's claims when it is active.

ct CancellationToken

Cancels raising the introspection events.

Returns

Task<Dictionary<string, object>>

The members of the JSON response: active, and for an active token its claims.

Remarks

For an API caller the token is reported inactive unless its audience names that API and it carries at least one of the API's scopes; scope is then narrowed to the API's own.

Exceptions

ArgumentNullException

validationResult is null.