Table of Contents

Interface IUserConsentStore

Namespace
Fdyay.IdentityServer.Services
Assembly
Fdyay.IdentityServer.Core.dll

Stores and retrieves users' consent decisions.

public interface IUserConsentStore

Methods

GetUserConsentAsync(string, string, CancellationToken)

The consent a user has stored for a client, or null.

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.

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.

Task StoreUserConsentAsync(Consent consent, CancellationToken cancellationToken = default)

Parameters

consent Consent

The consent.

cancellationToken CancellationToken

Cancels the write.

Returns

Task