Table of Contents

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

identifier string

The public half of the presented token.

secretDigest ReadOnlyMemory<byte>

The digest of the presented secret, which the removal is guarded by.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<bool>

true when a session was ended by this call.

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.