Table of Contents

Interface IConsentMessageStore

Namespace
Fdyay.IdentityServer.Stores
Assembly
Fdyay.IdentityServer.AspNetCore.dll

Carries a consent decision from the consent UI to the authorize endpoint. Duende's.

public interface IConsentMessageStore

Remarks

Duende 8.0.1's IConsentMessageStore, measured: GrantConsentAsync writes the decision, stamped with when it was made, and the authorize endpoint reads it and then deletes it, both under an id they each compute, so the browser carries no decision and no id between them. AddIdentityServer registers the default only where a host has not registered its own, as Duende's does.

Ours: the id names the client and the subject, where Duende's hashes them with the request's nonce and scopes, so a decision answers the next request this user makes of that client, as this server's always has. A store shared between instances therefore carries one decision per user and client at a time, and the authorize endpoint reads and deletes on every signed-in request rather than on the consent page's callback alone.

Methods

DeleteAsync(string, CancellationToken)

Deletes the consent decision written under id.

Task DeleteAsync(string id, CancellationToken ct)

Parameters

id string

The id of the request for consent answered.

ct CancellationToken

The cancellation token.

Returns

Task

ReadAsync(string, CancellationToken)

Reads the consent decision written under id, or null when there is none.

Task<Message<ConsentResponse>?> ReadAsync(string id, CancellationToken ct)

Parameters

id string

The id of the request for consent being answered.

ct CancellationToken

The cancellation token.

Returns

Task<Message<ConsentResponse>>

WriteAsync(string, Message<ConsentResponse>, CancellationToken)

Writes the consent decision under id.

Task WriteAsync(string id, Message<ConsentResponse> message, CancellationToken ct)

Parameters

id string

The id of the request for consent the decision answers.

message Message<ConsentResponse>

The decision.

ct CancellationToken

The cancellation token.

Returns

Task