Skip to main content

IClientSecretGenerator Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.RandomGenerators

IClientSecretGenerator Interface

Defines an interface responsible for generating secure client secrets for OpenID Connect (OIDC) clients. Client secrets are used as credentials for client authentication to the OIDC provider or authorization server.

public interface IClientSecretGenerator

Derived
ClientSecretGenerator

Methods

IClientSecretGenerator.GenerateClientSecret(int) Method

Generates a new, secure client secret string of the specified length. The generated secret is intended for use by confidential clients in OAuth 2.0 and OpenID Connect authentication flows. It is crucial that the generated secret is of sufficient length and randomness to ensure the security of client authentication processes.

string GenerateClientSecret(int length);

Parameters

length System.Int32

The desired length of the client secret. It is recommended that secrets be of sufficient length (e.g., at least 32 characters) to ensure adequate security against brute-force or guessing attacks.

Returns

System.String
A securely generated client secret string of the specified length. The secret should consist of a cryptographically strong, random sequence of characters that can include a mix of letters, digits, and special characters.