Class DefaultTokenCreationService
- Namespace
- Duende.IdentityServer.Services
- Assembly
- Duende.IdentityServer.dll
Default token creation service
public class DefaultTokenCreationService : ITokenCreationService
- Inheritance
-
DefaultTokenCreationService
- Implements
- Inherited Members
Constructors
DefaultTokenCreationService(IClock, IKeyMaterialService, IdentityServerOptions, ILogger<DefaultTokenCreationService>)
Initializes a new instance of the DefaultTokenCreationService class.
public DefaultTokenCreationService(IClock clock, IKeyMaterialService keys, IdentityServerOptions options, ILogger<DefaultTokenCreationService> logger)
Parameters
clockIClockThe options.
keysIKeyMaterialServiceThe keys.
optionsIdentityServerOptionsThe options.
loggerILogger<DefaultTokenCreationService>The logger.
Fields
Clock
The clock
protected readonly IClock Clock
Field Value
Keys
The key service
protected readonly IKeyMaterialService Keys
Field Value
Logger
The logger
protected readonly ILogger Logger
Field Value
Options
The options
protected readonly IdentityServerOptions Options
Field Value
Methods
CreateHeaderElementsAsync(Token)
Creates additional JWT header elements
protected virtual Task<Dictionary<string, object>> CreateHeaderElementsAsync(Token token)
Parameters
tokenToken
Returns
CreateJwtAsync(Token, string, Dictionary<string, object>)
Creates JWT token
protected virtual Task<string> CreateJwtAsync(Token token, string payload, Dictionary<string, object> headerElements)
Parameters
tokenTokenpayloadstringheaderElementsDictionary<string, object>
Returns
Exceptions
CreatePayloadAsync(Token)
Creates the JWT payload
protected virtual Task<string> CreatePayloadAsync(Token token)
Parameters
tokenToken
Returns
CreateTokenAsync(Token)
Creates the token.
public virtual Task<string> CreateTokenAsync(Token token)
Parameters
tokenTokenThe token.