Custom Authorize Request Validator
Duende.IdentityServer.Validation.ICustomAuthorizeRequestValidator
Section titled “Duende.IdentityServer.Validation.ICustomAuthorizeRequestValidator”Allows running custom code as part of the authorization issuance pipeline at the authorization endpoint.
/// <summary>/// Allows inserting custom validation logic into authorize requests/// </summary>public interface ICustomAuthorizeRequestValidator{ /// <summary> /// Custom validation logic for the authorize request. /// </summary> /// <param name="context">The context.</param> Task ValidateAsync(CustomAuthorizeRequestValidationContext context);}-
ValidateAsyncThis method gets called during authorize request processing. The context gives you access to request and response parameters.
To fail the request, set the
IsError, theError, and optionally theErrorDescriptionproperties on theResultobject on theCustomAuthorizeRequestValidationContext.