Table of Contents

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

store IPersistedGrantStore

The persisted grant store the consents are kept in, one per subject and client.

time TimeProvider

The 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

subjectId string

The user.

clientId string

The client.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<Consent>

The consent, or null when none is stored for the pair or it has expired.

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

subjectId string

The user.

clientId string

The client.

cancellationToken CancellationToken

Cancels the removal.

Returns

Task

Stores a user's consent for a client, replacing any already stored for the pair.

public Task StoreUserConsentAsync(Consent consent, CancellationToken cancellationToken = default)

Parameters

consent Consent

The consent.

cancellationToken CancellationToken

Cancels the write.

Returns

Task