Skip to main content

AuthorizationCodeGenerator Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.RandomGenerators

AuthorizationCodeGenerator Class

Generates secure authorization codes for OAuth 2.0 authorization code flows. This implementation relies on cryptographic randomness to generate codes that are difficult to predict, enhancing the security of the authorization process.

public class AuthorizationCodeGenerator : Abblix.Oidc.Server.Features.RandomGenerators.IAuthorizationCodeGenerator

Inheritance System.Object → AuthorizationCodeGenerator

Implements IAuthorizationCodeGenerator

Constructors

AuthorizationCodeGenerator(IOptions<OidcOptions>) Constructor

Generates secure authorization codes for OAuth 2.0 authorization code flows. This implementation relies on cryptographic randomness to generate codes that are difficult to predict, enhancing the security of the authorization process.

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

Parameters

options Microsoft.Extensions.Options.IOptions<OidcOptions>

Methods

AuthorizationCodeGenerator.GenerateAuthorizationCode() Method

Generates a unique authorization code using secure cryptographic methods. The code is URL-safe encoded to ensure it can be transmitted safely in URLs.

public string GenerateAuthorizationCode();

Implements GenerateAuthorizationCode()

Returns

System.String
A URL-safe, secure, and randomly generated authorization code.