Skip to main content

TokenIdGenerator Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.RandomGenerators

TokenIdGenerator Class

Default ITokenIdGenerator implementation. Draws random bytes from a cryptographically secure source (System.Security.Cryptography.RandomNumberGenerator via CryptoRandom) using the byte count configured in TokenIdLength, then URL-safe Base64 encodes the result so the resulting jti value can travel safely through HTTP transports.

public class TokenIdGenerator : Abblix.Oidc.Server.Features.RandomGenerators.ITokenIdGenerator

Inheritance System.Object → TokenIdGenerator

Implements ITokenIdGenerator

Constructors

TokenIdGenerator(IOptions<OidcOptions>) Constructor

Default ITokenIdGenerator implementation. Draws random bytes from a cryptographically secure source (System.Security.Cryptography.RandomNumberGenerator via CryptoRandom) using the byte count configured in TokenIdLength, then URL-safe Base64 encodes the result so the resulting jti value can travel safely through HTTP transports.

public TokenIdGenerator(Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options);

Parameters

options Microsoft.Extensions.Options.IOptions<OidcOptions>

Methods

TokenIdGenerator.GenerateTokenId() Method

Produces a new jti value from cryptographically secure random bytes, sized per TokenIdLength and URL-safe Base64 encoded.

public string GenerateTokenId();

Implements GenerateTokenId()

Returns

System.String
A URL-safe, randomly generated unique identifier for a JWT.