Skip to main content

AuthorizationGrantValidator Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Endpoints.Token.Validation

AuthorizationGrantValidator Class

Validates the authorization grant in the context of a token request, ensuring that the request is authorized and that the associated redirect URI matches the one used during the initial authorization request

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

Inheritance System.Object → AuthorizationGrantValidator

Implements ITokenContextValidator

Remarks

This validator interacts with the IAuthorizationGrantHandler to perform the necessary checks on the authorization grant. It ensures that the token request is made for an authorized grant and verifies the consistency of the redirect URI. If the grant is valid and authorized, it updates the validation context

Constructors

AuthorizationGrantValidator(IAuthorizationGrantHandler) Constructor

Validates the authorization grant in the context of a token request, ensuring that the request is authorized and that the associated redirect URI matches the one used during the initial authorization request

public AuthorizationGrantValidator(Abblix.Oidc.Server.Endpoints.Token.Grants.IAuthorizationGrantHandler grantHandler);

Parameters

grantHandler IAuthorizationGrantHandler

The handler responsible for authorizing the grant.

Remarks

This validator interacts with the IAuthorizationGrantHandler to perform the necessary checks on the authorization grant. It ensures that the token request is made for an authorized grant and verifies the consistency of the redirect URI. If the grant is valid and authorized, it updates the validation context

Methods

AuthorizationGrantValidator.ValidateAsync(TokenValidationContext) Method

Asynchronously validates the authorization grant in the token request context. This method checks if the grant is valid and authorized for the client making the request. It also ensures that the redirect URI used in the token request matches the one used during the initial authorization request.

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

Parameters

context TokenValidationContext

The validation context containing the token request and client information.

Implements ValidateAsync(TokenValidationContext)

Returns

System.Threading.Tasks.Task<OidcError>
A OidcError if the authorization grant is invalid, including an error code and description; otherwise, null indicating that the grant is valid and the context has been updated.