Class DefaultUserConsentStore
- Namespace
- Fdyay.IdentityServer.Services
- 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 DefaultUserConsentStore : IUserConsentStore
- Inheritance
-
DefaultUserConsentStore
- Implements
- Inherited Members
Constructors
DefaultUserConsentStore(IPersistedGrantStore, TimeProvider)
A consent store over store.
public DefaultUserConsentStore(IPersistedGrantStore store, TimeProvider time)
Parameters
storeIPersistedGrantStoreThe persisted grant store the consents are kept in, one per subject and client.
timeTimeProviderThe clock a consent's expiry is checked against.
Methods
GetUserConsentAsync(string, string, CancellationToken)
The consent a user has stored for a client, or null.
public Task<Consent?> GetUserConsentAsync(string subjectId, string clientId, CancellationToken cancellationToken = default)
Parameters
subjectIdstringThe user.
clientIdstringThe client.
cancellationTokenCancellationTokenCancels the read.
Returns
RemoveUserConsentAsync(string, string, CancellationToken)
Removes the consent a user has stored for a client.
public Task RemoveUserConsentAsync(string subjectId, string clientId, CancellationToken cancellationToken = default)
Parameters
subjectIdstringThe user.
clientIdstringThe client.
cancellationTokenCancellationTokenCancels the removal.
Returns
StoreUserConsentAsync(Consent, CancellationToken)
Stores a user's consent for a client, replacing any already stored for the pair.
public Task StoreUserConsentAsync(Consent consent, CancellationToken cancellationToken = default)
Parameters
consentConsentThe consent.
cancellationTokenCancellationTokenCancels the write.