Method RevokeAsync
- Namespace
- MailFathom.Application.Access.Sessions
- Assembly
- MailFathom.Application.dll
RevokeAsync(string, ReadOnlyMemory<byte>, CancellationToken)
Ends one session, so the token it was signed in with is refused on the next request rather than at its expiry.
Task<bool> RevokeAsync(string identifier, ReadOnlyMemory<byte> secretDigest, CancellationToken cancellationToken)
Parameters
identifierstringThe public half of the presented token.
secretDigestReadOnlyMemory<byte>The digest of the presented secret, which the removal is guarded by.
cancellationTokenCancellationTokenCancels the write.
Returns
Remarks
Guarded by the digest for the reason the renewal's removal is: the identifier is the half of a token that is not a secret, and a removal keyed on it alone would be a sign-out anybody could perform.
Exceptions
- ClientSessionStoreUnavailableException
Thrown when the sessions could not be reached.