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
tokenServiceITokenServiceBuilds and signs the access and identity tokens.
refreshTokenServiceIRefreshTokenServiceIssues and rotates refresh tokens.
timeTimeProviderThe 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
requestValidatedTokenRequestThe validated token request.
cancellationTokenCancellationTokenCancels the token creation and storage.
Returns
- Task<Dictionary<string, object>>
The members of the JSON token response.