Skip to main content

IAuthServiceJwtFormatter Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.Tokens.Formatters

IAuthServiceJwtFormatter Interface

Serializes a JsonWebToken minted by the authorization server itself (access tokens, refresh tokens, Registration Access Tokens) into a compact JWS form (RFC 7515) using the server's signing keys, optionally wrapping the result in a JWE (RFC 7516) when an encryption key is available.

public interface IAuthServiceJwtFormatter

Derived
AuthServiceJwtFormatter

Methods

IAuthServiceJwtFormatter.FormatAsync(JsonWebToken) Method

Formats and signs a JWT for use within the authentication service, applying cryptographic operations such as signing and optionally encrypting the token based on the specified requirements.

System.Threading.Tasks.Task<string> FormatAsync(Abblix.Jwt.JsonWebToken token);

Parameters

token JsonWebToken

The JSON Web Token (JWT) to be formatted and signed, potentially also encrypted.

Returns

System.Threading.Tasks.Task<System.String>
A task representing the asynchronous operation, which results in the JWT formatted as a string.