Skip to main content

IRefreshTokenService Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.Tokens

IRefreshTokenService Interface

Issues and consumes OAuth 2.0 refresh tokens (RFC 6749 §6) used to obtain renewed access tokens without re-prompting the user. Implementations apply the configured absolute and sliding expiration policies and may revoke the previous refresh token when reuse is disallowed.

public interface IRefreshTokenService

Derived
RefreshTokenService

Methods

IRefreshTokenService.AuthorizeByRefreshTokenAsync(JsonWebToken) Method

Reconstructs the AuthorizedGrant represented by a previously issued refresh token, or returns an OidcError when the token cannot be honored.

System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Token.Interfaces.AuthorizedGrant,Abblix.Oidc.Server.Common.OidcError>> AuthorizeByRefreshTokenAsync(Abblix.Jwt.JsonWebToken refreshToken);

Parameters

refreshToken JsonWebToken

Returns

System.Threading.Tasks.Task<Abblix.Utils.Result<AuthorizedGrant,OidcError>>

IRefreshTokenService.CreateRefreshTokenAsync(AuthSession, AuthorizationContext, ClientInfo, JsonWebToken) Method

Issues a refresh token for the supplied authentication session and authorization context. When refreshToken is non-null the call represents a refresh-token rotation and the previous token may be revoked according to the client's policy. Returns null when expiration policies have already elapsed and no new token can be issued.

System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.Tokens.EncodedJsonWebToken?> CreateRefreshTokenAsync(Abblix.Oidc.Server.Features.UserAuthentication.AuthSession authSession, Abblix.Oidc.Server.Common.AuthorizationContext authContext, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo, Abblix.Jwt.JsonWebToken? refreshToken);

Parameters

authSession AuthSession
authContext AuthorizationContext
clientInfo ClientInfo
refreshToken JsonWebToken

Returns

System.Threading.Tasks.Task<EncodedJsonWebToken>