ITokenRegistry Interface
Abblix.Oidc.Server
Abblix.Oidc.Server.Features.Storages
ITokenRegistry Interface
Represents a registry that manages the statuses of JSON Web Tokens (JWTs). This registry allows for tracking and updating the status of tokens, such as marking them as used or revoked.
public interface ITokenRegistry
Derived
↳ TokenRegistry
Methods
ITokenRegistry.GetStatusAsync(string) Method
Asynchronously retrieves the current status of a specified JWT identifier.
System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.Tokens.Revocation.JsonWebTokenStatus> GetStatusAsync(string jwtId);
Parameters
jwtId System.String
The identifier of the JWT whose status is to be queried.
Returns
System.Threading.Tasks.Task<JsonWebTokenStatus>
A task that returns the JsonWebTokenStatus of the JWT
(e.g., active, revoked).
ITokenRegistry.SetStatusAsync(string, JsonWebTokenStatus, DateTimeOffset) Method
Asynchronously sets the status for a specified JWT identifier. This operation may be used to mark a token as used or revoked.
System.Threading.Tasks.Task SetStatusAsync(string jwtId, Abblix.Oidc.Server.Features.Tokens.Revocation.JsonWebTokenStatus status, System.DateTimeOffset expiresAt);
Parameters
jwtId System.String
The identifier of the JWT whose status is to be updated.
status JsonWebTokenStatus
The new status to be assigned to the JWT, such as Used or Revoked.
expiresAt System.DateTimeOffset
The expiration time of the JWT. This is used to determine if the status should be updated based on the token's validity.
Returns
System.Threading.Tasks.Task
A task representing the asynchronous operation of updating the token's status.