Skip to main content

ILogoutTokenSender Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.LogoutNotification

ILogoutTokenSender Interface

Defines the interface for a service responsible for sending logout tokens to clients via the back-channel.

public interface ILogoutTokenSender

Derived
BackChannelLogoutTokenSender

Methods

ILogoutTokenSender.SendBackChannelLogoutAsync(ClientInfo, EncodedJsonWebToken) Method

Asynchronously sends a logout token to a client using back-channel communication.

System.Threading.Tasks.Task SendBackChannelLogoutAsync(Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo, Abblix.Oidc.Server.Features.Tokens.EncodedJsonWebToken logoutToken);

Parameters

clientInfo ClientInfo

The information about the client to which the logout token will be sent. This includes the client's identifier and any relevant endpoints for back-channel communication.

logoutToken EncodedJsonWebToken

The logout token that encapsulates the logout information. This token is typically a JSON Web Token (JWT) that contains claims relevant to the logout event, such as the subject identifier and the session identifier.

Returns

System.Threading.Tasks.Task
A System.Threading.Tasks.Task representing the asynchronous operation of sending the logout token. The task completes when the logout token has been successfully sent to the client's back-channel endpoint, or an attempt has been made to send the token.

Remarks

Implementations of this interface are responsible for securely transmitting the logout token to the client's back-channel endpoint specified in the clientInfo. This process usually involves making an HTTP POST request to the client's back-channel logout URI with the logout token included in the request body.

It's important for implementations to handle any errors or exceptions that may occur during the transmission process and ensure proper logging and error handling mechanisms are in place. This ensures that logout events are reliably communicated to clients, even in scenarios where direct user-agent-based communication (front-channel logout) is not feasible.