Class InMemoryPushedAuthorizationRequestStore
- Namespace
- Fdyay.IdentityServer.Stores.InMemory
- Assembly
- Fdyay.IdentityServer.Core.dll
In-memory pushed authorization request store. Intended for development and testing.
public class InMemoryPushedAuthorizationRequestStore : IPushedAuthorizationRequestStore
- Inheritance
-
InMemoryPushedAuthorizationRequestStore
- Implements
- Inherited Members
Remarks
In-process, so a pushed request is only redeemable on the instance that accepted it. A multi-instance deployment needs a shared store, or a client will push to one instance and be sent to another that has never heard of the reference value.
Methods
GetAsync(string, CancellationToken)
Reads a pushed request by the hash of its reference value.
public Task<PushedAuthorizationRequest?> GetAsync(string referenceValueHash, CancellationToken cancellationToken = default)
Parameters
referenceValueHashstringcancellationTokenCancellationToken
Returns
- Task<PushedAuthorizationRequest>
Null when the hash is unknown. Expiry is the caller's to enforce.
RemoveAsync(string, CancellationToken)
Removes a pushed request, so a reference value cannot be redeemed twice.
public Task RemoveAsync(string referenceValueHash, CancellationToken cancellationToken = default)
Parameters
referenceValueHashstringcancellationTokenCancellationToken
Returns
StoreAsync(PushedAuthorizationRequest, CancellationToken)
Stores a pushed request, replacing any entry with the same hash.
public Task StoreAsync(PushedAuthorizationRequest request, CancellationToken cancellationToken = default)
Parameters
requestPushedAuthorizationRequestcancellationTokenCancellationToken