LogoutTokenService Class
Abblix.Oidc.Server
Abblix.Oidc.Server.Features.Tokens
LogoutTokenService Class
Implements the ILogoutTokenService interface to generate logout tokens.
public class LogoutTokenService : Abblix.Oidc.Server.Features.Tokens.ILogoutTokenService
Inheritance System.Object → LogoutTokenService
Implements ILogoutTokenService
Constructors
LogoutTokenService(ILogger<LogoutTokenService>, TimeProvider, ISubjectTypeConverter, IClientJwtFormatter, ITokenIdGenerator, IOptions<OidcOptions>) Constructor
Implements the ILogoutTokenService interface to generate logout tokens.
public LogoutTokenService(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Features.Tokens.LogoutTokenService> logger, System.TimeProvider clock, Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter subjectTypeConverter, Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter jwtFormatter, Abblix.Oidc.Server.Features.RandomGenerators.ITokenIdGenerator tokenIdGenerator, Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options);
Parameters
logger Microsoft.Extensions.Logging.ILogger<LogoutTokenService>
Logger for logging operations related to logout token generation.
clock System.TimeProvider
Clock used for setting token validity timestamps.
subjectTypeConverter ISubjectTypeConverter
Converter for transforming subject identifiers based on client configurations.
jwtFormatter IClientJwtFormatter
Formatter for encoding the generated logout token into a compact serialized format.
tokenIdGenerator ITokenIdGenerator
Generator for creating unique JWT identifiers.
options Microsoft.Extensions.Options.IOptions<OidcOptions>
Supplies the default content-encryption algorithm used when the client registered a
key-management algorithm but no id_token_encrypted_response_enc.
Methods
LogoutTokenService.CreateLogoutTokenAsync(ClientInfo, LogoutContext) Method
Asynchronously creates a logout token based on the provided client information and logout event context. The token is then encoded to a serialized string format for easy distribution to clients.
public System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.Tokens.EncodedJsonWebToken> CreateLogoutTokenAsync(Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo, Abblix.Oidc.Server.Features.LogoutNotification.LogoutContext logoutContext);
Parameters
clientInfo ClientInfo
Information about the client that will receive the logout token.
logoutContext LogoutContext
Contextual information about the logout event, including the user's subject ID and session ID.
Implements CreateLogoutTokenAsync(ClientInfo, LogoutContext)
Returns
System.Threading.Tasks.Task<EncodedJsonWebToken>
A task that returns a logout token.
The task result is an EncodedJsonWebToken, which includes both the raw token object and its
string representation.