Table of Contents

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

request ValidatedAuthorizeRequest

AuthorizeRequestValidationResult(ValidatedAuthorizeRequest, string, string?)

A refused request: the client is told error and errorDescription.

public AuthorizeRequestValidationResult(ValidatedAuthorizeRequest request, string error, string? errorDescription = null)

Parameters

request ValidatedAuthorizeRequest
error string
errorDescription string

Properties

CanRedirect

Whether the error may be returned to the client's redirect URI.

public bool CanRedirect { get; init; }

Property Value

bool

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

string

ErrorDescription

A human-readable explanation sent as error_description, when there is one.

public string? ErrorDescription { get; init; }

Property Value

string

IsError

Whether the request was refused.

public bool IsError { get; init; }

Property Value

bool

ValidatedRequest

The request, as far as it was validated. Duende's name.

public ValidatedAuthorizeRequest? ValidatedRequest { get; init; }

Property Value

ValidatedAuthorizeRequest

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

error string

The OAuth error code to answer with.

description string

The error_description, when there is one.

canRedirect bool

Whether 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.

request ValidatedAuthorizeRequest

The 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

request ValidatedAuthorizeRequest

The validated request.

Returns

AuthorizeRequestValidationResult

A result with IsError false.