Skip to main content

IClientJwtFormatter Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.Tokens.Formatters

IClientJwtFormatter Interface

Serializes a JWT addressed to a specific client (ID Token, Logout Token, etc.) into compact form: signed as a JWS (RFC 7515) with the server's signing key chosen by the JWT's header algorithm, then optionally wrapped in a JWE (RFC 7516) encrypted to the client's registered public key per the client's id_token_encrypted_response_alg/_enc metadata.

public interface IClientJwtFormatter

Derived
ClientJwtFormatter

Methods

IClientJwtFormatter.FormatAsync(JsonWebToken, ClientInfo) Method

Formats a JWT for a client, inferring the encryption metadata from the token's header typ.

System.Threading.Tasks.Task<string> FormatAsync(Abblix.Jwt.JsonWebToken token, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo);

Parameters

token JsonWebToken

The JWT token to format.

clientInfo ClientInfo

The client information.

Returns

System.Threading.Tasks.Task<System.String>
The formatted JWT string.

IClientJwtFormatter.FormatAsync(JsonWebToken, ClientInfo, ClientJwtEncryption) Method

Formats a JWT for a client, signing it with the authentication service's key chosen by the token's header algorithm and — per the supplied encryption policy — optionally encrypting it to the client's registered public key.

System.Threading.Tasks.Task<string> FormatAsync(Abblix.Jwt.JsonWebToken token, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo, Abblix.Oidc.Server.Features.Tokens.Formatters.ClientJwtEncryption encryption);

Parameters

token JsonWebToken

The JWT token to format.

clientInfo ClientInfo

The client information.

encryption ClientJwtEncryption

The encryption policy governing whether and how the JWT is encrypted.

Returns

System.Threading.Tasks.Task<System.String>
The formatted JWT string.