Skip to content
Abblix

AuthorizationRequestValidator Class

Implements the Chain of Responsibility design pattern for processing authorization requests. This class delegates the validation of authorization requests to an IAuthorizationContextValidator, allowing a sequence of validators to handle the request in a decoupled manner. Each validator in the chain processes the request and potentially passes it along to the next validator.

C#
public class AuthorizationRequestValidator : Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.IAuthorizationRequestValidator

Inheritance System.Object → AuthorizationRequestValidator

Implements IAuthorizationRequestValidator

Constructors

AuthorizationRequestValidator(IAuthorizationContextValidator) Constructor

Implements the Chain of Responsibility design pattern for processing authorization requests. This class delegates the validation of authorization requests to an IAuthorizationContextValidator, allowing a sequence of validators to handle the request in a decoupled manner. Each validator in the chain processes the request and potentially passes it along to the next validator.

C#
public AuthorizationRequestValidator(Abblix.Oidc.Server.Endpoints.Authorization.Validation.IAuthorizationContextValidator validator);

Parameters

validator IAuthorizationContextValidator

The first validator in the chain to handle the authorization context.

Methods

AuthorizationRequestValidator.ValidateAsync(AuthorizationRequest) Method

Asynchronously validates an AuthorizationRequest by passing it through a chain of validators. The method creates a validation context and delegates the validation process to the initial validator in the chain, which can then pass the request to subsequent validators as necessary.

C#
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest,Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.AuthorizationRequestValidationError>> ValidateAsync(Abblix.Oidc.Server.Model.AuthorizationRequest request);

Parameters

request AuthorizationRequest

The authorization request to validate.

Implements ValidateAsync(AuthorizationRequest)

Returns

System.Threading.Tasks.Task<Abblix.Utils.Result<ValidAuthorizationRequest,AuthorizationRequestValidationError>>
A Abblix.Utils.Result<> of ValidAuthorizationRequest on success or AuthorizationRequestValidationError on failure, representing the outcome of the validation process, which may be the result of processing by one or more validators in the chain.