Skip to main content

TokenContextValidatorComposite Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Endpoints.Token.Validation

TokenContextValidatorComposite Class

Represents a composite validator for token context validation, executing a sequence of individual validators. This class allows multiple validators to be combined, each responsible for a specific validation step, and short-circuits the validation process if any step fails.

public class TokenContextValidatorComposite : Abblix.Oidc.Server.Endpoints.Token.Validation.ITokenContextValidator

Inheritance System.Object → TokenContextValidatorComposite

Implements ITokenContextValidator

Constructors

TokenContextValidatorComposite(ITokenContextValidator[]) Constructor

Represents a composite validator for token context validation, executing a sequence of individual validators. This class allows multiple validators to be combined, each responsible for a specific validation step, and short-circuits the validation process if any step fails.

public TokenContextValidatorComposite(Abblix.Oidc.Server.Endpoints.Token.Validation.ITokenContextValidator[] validators);

Parameters

validators ITokenContextValidator[]

An array of validators representing the steps in the validation process.

Methods

TokenContextValidatorComposite.ValidateAsync(TokenValidationContext) Method

Asynchronously validates the token request by executing each validator in the sequence. The validation process stops at the first encountered error and returns it. If all validators succeed, the method returns null, indicating successful validation.

public System.Threading.Tasks.Task<Abblix.Oidc.Server.Common.OidcError?> ValidateAsync(Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext context);

Parameters

context TokenValidationContext

The context containing the token request and related information that needs to be validated.

Implements ValidateAsync(TokenValidationContext)

Returns

System.Threading.Tasks.Task<OidcError>
A OidcError containing error details if any validation step fails; otherwise, returns null indicating that all validation steps were successful.