Table of Contents

Class DefaultTokenResponseGenerator

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

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public sealed class DefaultTokenResponseGenerator : ITokenResponseGenerator
Inheritance
DefaultTokenResponseGenerator
Implements
Inherited Members

Constructors

DefaultTokenResponseGenerator(ITokenService, IRefreshTokenService, TimeProvider?)

Creates the generator.

public DefaultTokenResponseGenerator(ITokenService tokenService, IRefreshTokenService refreshTokenService, TimeProvider? time = null)

Parameters

tokenService ITokenService

Builds and signs the access and identity tokens.

refreshTokenService IRefreshTokenService

Issues and rotates refresh tokens.

time TimeProvider

The clock a kept access token is renewed against on refresh. Null reads as the system clock.

Methods

ProcessAsync(ValidatedTokenRequest, CancellationToken)

Issues the tokens a validated request has earned and returns the token response members (RFC 6749 ยง5.1), keyed by their parameter names: access_token, token_type, expires_in and scope, with refresh_token, id_token and issued_token_type where the grant calls for them.

public Task<Dictionary<string, object>> ProcessAsync(ValidatedTokenRequest request, CancellationToken cancellationToken = default)

Parameters

request ValidatedTokenRequest

The validated token request.

cancellationToken CancellationToken

Cancels the token creation and storage.

Returns

Task<Dictionary<string, object>>

The members of the JSON token response.