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
clock
IClockThe options.
keys
IKeyMaterialServiceThe keys.
options
IdentityServerOptionsThe options.
logger
ILogger<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
token
Token
Returns
CreateJwtAsync(Token, string, Dictionary<string, object>)
Creates JWT token
protected virtual Task<string> CreateJwtAsync(Token token, string payload, Dictionary<string, object> headerElements)
Parameters
token
Tokenpayload
stringheaderElements
Dictionary<string, object>
Returns
Exceptions
CreatePayloadAsync(Token)
Creates the JWT payload
protected virtual Task<string> CreatePayloadAsync(Token token)
Parameters
token
Token
Returns
CreateTokenAsync(Token)
Creates the token.
public virtual Task<string> CreateTokenAsync(Token token)
Parameters
token
TokenThe token.