Skip to main content

NonceValidator Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Endpoints.Authorization.Validation

NonceValidator Class

Implements nonce validation for authorization requests in compliance with OAuth 2.0 and OpenID Connect specifications. This validator ensures the presence of a nonce parameter when the response type includes an ID token, as by OpenID Connect Core 1.0 specification. It extends SyncAuthorizationContextValidatorBase for synchronous validation. Refer to RFC 6749 and OpenID Connect Core 1.0 for more details on authorization request parameters.

public class NonceValidator : Abblix.Oidc.Server.Endpoints.Authorization.Validation.IAuthorizationContextValidator

Inheritance System.Object → NonceValidator

Implements IAuthorizationContextValidator

Constructors

NonceValidator(IAuthorizationValueReuseDetector) Constructor

Implements nonce validation for authorization requests in compliance with OAuth 2.0 and OpenID Connect specifications. This validator ensures the presence of a nonce parameter when the response type includes an ID token, as by OpenID Connect Core 1.0 specification. It extends SyncAuthorizationContextValidatorBase for synchronous validation. Refer to RFC 6749 and OpenID Connect Core 1.0 for more details on authorization request parameters.

public NonceValidator(Abblix.Oidc.Server.Features.ReusePrevention.IAuthorizationValueReuseDetector reuseDetector);

Parameters

reuseDetector IAuthorizationValueReuseDetector

Methods

NonceValidator.ValidateAsync(AuthorizationValidationContext) Method

Validates the nonce in the authorization request as per OpenID Connect Core 1.0 specifications.

public System.Threading.Tasks.Task<Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.AuthorizationRequestValidationError?> ValidateAsync(Abblix.Oidc.Server.Endpoints.Authorization.Validation.AuthorizationValidationContext context);

Parameters

context AuthorizationValidationContext

The AuthorizationValidationContext containing the authorization request to be validated.

Implements ValidateAsync(AuthorizationValidationContext)

Returns

System.Threading.Tasks.Task<AuthorizationRequestValidationError>
An AuthorizationRequestValidationError if the validation fails due to a missing nonce when the response type includes an ID token, as by OpenID Connect Core 1.0; otherwise, null indicating successful validation.