Class DefaultTokenService
- Namespace
- Duende.IdentityServer.Services
- Assembly
- Duende.IdentityServer.dll
Default token service
public class DefaultTokenService : ITokenService
- Inheritance
-
DefaultTokenService
- Implements
- Inherited Members
Constructors
DefaultTokenService(IClaimsService, IReferenceTokenStore, ITokenCreationService, IClock, IKeyMaterialService, IdentityServerOptions, ILogger<DefaultTokenService>)
Initializes a new instance of the DefaultTokenService class.
public DefaultTokenService(IClaimsService claimsProvider, IReferenceTokenStore referenceTokenStore, ITokenCreationService creationService, IClock clock, IKeyMaterialService keyMaterialService, IdentityServerOptions options, ILogger<DefaultTokenService> logger)
Parameters
claimsProviderIClaimsServiceThe claims provider.
referenceTokenStoreIReferenceTokenStoreThe reference token store.
creationServiceITokenCreationServiceThe signing service.
clockIClockThe clock.
keyMaterialServiceIKeyMaterialServiceoptionsIdentityServerOptionsThe IdentityServer options
loggerILogger<DefaultTokenService>The logger.
Fields
ClaimsProvider
The claims provider
protected readonly IClaimsService ClaimsProvider
Field Value
Clock
The clock
protected readonly IClock Clock
Field Value
CreationService
The signing service
protected readonly ITokenCreationService CreationService
Field Value
KeyMaterialService
The key material service
protected readonly IKeyMaterialService KeyMaterialService
Field Value
Logger
The logger
protected readonly ILogger Logger
Field Value
Options
The IdentityServer options
protected readonly IdentityServerOptions Options
Field Value
ReferenceTokenStore
The reference token store
protected readonly IReferenceTokenStore ReferenceTokenStore
Field Value
- IReferenceTokenStore
Methods
CreateAccessTokenAsync(TokenCreationRequest)
Creates an access token.
public virtual Task<Token> CreateAccessTokenAsync(TokenCreationRequest request)
Parameters
requestTokenCreationRequestThe token creation request.
Returns
- Task<Token>
An access token
CreateIdentityTokenAsync(TokenCreationRequest)
Creates an identity token.
public virtual Task<Token> CreateIdentityTokenAsync(TokenCreationRequest request)
Parameters
requestTokenCreationRequestThe token creation request.
Returns
- Task<Token>
An identity token
CreateSecurityTokenAsync(Token)
Creates a serialized and protected security token.
public virtual Task<string> CreateSecurityTokenAsync(Token token)
Parameters
tokenTokenThe token.
Returns
Exceptions
- InvalidOperationException
Invalid token type.