Class DefaultConsentService
- Namespace
- Duende.IdentityServer.Services
- Assembly
- Duende.IdentityServer.dll
Default consent service
public class DefaultConsentService : IConsentService
- Inheritance
-
DefaultConsentService
- Implements
- Inherited Members
Constructors
DefaultConsentService(IClock, IUserConsentStore, ILogger<DefaultConsentService>)
Initializes a new instance of the DefaultConsentService class.
public DefaultConsentService(IClock clock, IUserConsentStore userConsentStore, ILogger<DefaultConsentService> logger)
Parameters
clock
IClockThe clock.
userConsentStore
IUserConsentStoreThe user consent store.
logger
ILogger<DefaultConsentService>The logger.
Exceptions
- ArgumentNullException
store
Fields
Clock
The clock
protected readonly IClock Clock
Field Value
Logger
The logger
protected readonly ILogger<DefaultConsentService> Logger
Field Value
UserConsentStore
The user consent store
protected readonly IUserConsentStore UserConsentStore
Field Value
- IUserConsentStore
Methods
RequiresConsentAsync(ClaimsPrincipal, Client, IEnumerable<ParsedScopeValue>)
Checks if consent is required.
public virtual Task<bool> RequiresConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable<ParsedScopeValue> parsedScopes)
Parameters
subject
ClaimsPrincipalThe user.
client
ClientThe client.
parsedScopes
IEnumerable<ParsedScopeValue>The parsed scopes.
Returns
Exceptions
- ArgumentNullException
client or subject
UpdateConsentAsync(ClaimsPrincipal, Client, IEnumerable<ParsedScopeValue>)
Updates the consent asynchronous.
public virtual Task UpdateConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable<ParsedScopeValue> parsedScopes)
Parameters
subject
ClaimsPrincipalThe subject.
client
ClientThe client.
parsedScopes
IEnumerable<ParsedScopeValue>The parsed scopes.
Returns
Exceptions
- ArgumentNullException
client or subject