RevocationCutoffRegistry Class
Keeps revocation cutoffs in the same entity storage the rest of the server's short-lived state lives in.
public class RevocationCutoffRegistry : Abblix.Oidc.Server.Features.Storages.IRevocationCutoffRegistryInheritance System.Object → RevocationCutoffRegistry
Implements IRevocationCutoffRegistry
Constructors
RevocationCutoffRegistry(IEntityStorage, IEntityStorageKeyFactory) Constructor
Keeps revocation cutoffs in the same entity storage the rest of the server's short-lived state lives in.
public RevocationCutoffRegistry(Abblix.Oidc.Server.Features.Storages.IEntityStorage storage, Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory keyFactory);Parameters
storage IEntityStorage
Where the cutoff is written and read.
keyFactory IEntityStorageKeyFactory
Names the entry, so a deployment sharing one store across products keeps its own namespace.
Methods
RevocationCutoffRegistry.GetCutoffAsync(RevocationScope, string, CancellationToken) Method
The cutoff recorded for a principal, or null when none is.
public System.Threading.Tasks.Task<System.Nullable<System.DateTimeOffset>> GetCutoffAsync(Abblix.Oidc.Server.Features.Tokens.Revocation.RevocationScope scope, string principal, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
scope RevocationScope
Whether the principal is an end user or a single session.
principal System.String
The subject identifier or the session identifier.
cancellationToken System.Threading.CancellationToken
Cancels the lookup.
Implements GetCutoffAsync(RevocationScope, string, CancellationToken)
Returns
System.Threading.Tasks.Task<System.Nullable<System.DateTimeOffset>>
The moment before which tokens for this principal are revoked.
RevocationCutoffRegistry.SetCutoffAsync(RevocationScope, string, DateTimeOffset, DateTimeOffset, CancellationToken) Method
Records a cutoff for a principal.
public System.Threading.Tasks.Task SetCutoffAsync(Abblix.Oidc.Server.Features.Tokens.Revocation.RevocationScope scope, string principal, System.DateTimeOffset cutoff, System.DateTimeOffset expiresAt, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
scope RevocationScope
Whether the principal is an end user or a single session.
principal System.String
The subject identifier or the session identifier.
cutoff System.DateTimeOffset
The moment before which tokens for this principal are revoked.
expiresAt System.DateTimeOffset
When the record may be dropped, which is when the longest-lived token it could refuse has expired anyway.
cancellationToken System.Threading.CancellationToken
Cancels the write.
Implements SetCutoffAsync(RevocationScope, string, DateTimeOffset, DateTimeOffset, CancellationToken)
Returns
System.Threading.Tasks.Task
A task that completes once the cutoff has been written.