Class AuthorizeRequestValidationResult
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.Core.dll
The outcome of validating an authorize request.
public sealed class AuthorizeRequestValidationResult
- Inheritance
-
AuthorizeRequestValidationResult
- Inherited Members
Remarks
Duende 8.0.1's two constructors, measured, for a custom validator to answer with.
Constructors
AuthorizeRequestValidationResult(ValidatedAuthorizeRequest)
A valid request.
public AuthorizeRequestValidationResult(ValidatedAuthorizeRequest request)
Parameters
requestValidatedAuthorizeRequest
AuthorizeRequestValidationResult(ValidatedAuthorizeRequest, string, string?)
A refused request: the client is told error and errorDescription.
public AuthorizeRequestValidationResult(ValidatedAuthorizeRequest request, string error, string? errorDescription = null)
Parameters
requestValidatedAuthorizeRequesterrorstringerrorDescriptionstring
Properties
CanRedirect
Whether the error may be returned to the client's redirect URI.
public bool CanRedirect { get; init; }
Property Value
Error
The OAuth error code the request was refused with, such as invalid_request; null for a valid request.
public string? Error { get; init; }
Property Value
ErrorDescription
A human-readable explanation sent as error_description, when there is one.
public string? ErrorDescription { get; init; }
Property Value
IsError
Whether the request was refused.
public bool IsError { get; init; }
Property Value
ValidatedRequest
The request, as far as it was validated. Duende's name.
public ValidatedAuthorizeRequest? ValidatedRequest { get; init; }
Property Value
Methods
Failure(string, string?, bool, ValidatedAuthorizeRequest?)
A refused request.
public static AuthorizeRequestValidationResult Failure(string error, string? description = null, bool canRedirect = false, ValidatedAuthorizeRequest? request = null)
Parameters
errorstringThe OAuth error code to answer with.
descriptionstringThe
error_description, when there is one.canRedirectboolWhether the error may go back to the client's redirect URI: only once the client and its redirect URI have been validated. Otherwise it is shown on the error page.
requestValidatedAuthorizeRequestThe request as far as it was validated, when it got far enough to have one.
Returns
- AuthorizeRequestValidationResult
A result with IsError true.
Success(ValidatedAuthorizeRequest)
A valid request.
public static AuthorizeRequestValidationResult Success(ValidatedAuthorizeRequest request)
Parameters
requestValidatedAuthorizeRequestThe validated request.
Returns
- AuthorizeRequestValidationResult
A result with IsError false.