Skip to main content

AuthorizationError Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Endpoints.Authorization.Interfaces

AuthorizationError Class

Represents an error response for an authorization request, detailing the nature of the error.

public record AuthorizationError : Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ClientDeliveredResponse, System.IEquatable<Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.AuthorizationError>

Inheritance System.ObjectAuthorizationResponseClientDeliveredResponse → AuthorizationError

Implements System.IEquatable<AuthorizationError>

Remarks

This record encapsulates information about errors encountered during the processing of an authorization request. It includes details that can be returned to the client to indicate what went wrong. This structure facilitates compliance with OAuth 2.0 and OpenID Connect specifications by providing a standardized format for error reporting.

This is the response-stage error type, a variant of the AuthorizationResponse polymorphic hierarchy alongside LoginRequired, ConsentRequired, SuccessfullyAuthenticated etc. The validator pipeline produces the lighter AuthorizationRequestValidationError; this type wraps it (via the secondary constructor) with the originating Model needed for state propagation through the formatter, plus the optional error_uri.

Two parallel error types exist because of the layered architecture: the validator pipeline operates on the generic Abblix.Utils.Result<> envelope and stays free of response-level concerns. The cost is field duplication (Error, ErrorDescription, ResponseMode, RedirectUri) — accepted for the architectural seam.

Constructors

AuthorizationError(AuthorizationRequest, AuthorizationRequestValidationError) Constructor

Constructs an instance of AuthorizationError from an AuthorizationRequest and an AuthorizationRequestValidationError.

public AuthorizationError(Abblix.Oidc.Server.Model.AuthorizationRequest request, Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.AuthorizationRequestValidationError error);

Parameters

request AuthorizationRequest

The request that resulted in the error.

error AuthorizationRequestValidationError

The validation error that provides details about what caused the request to fail.

AuthorizationError(AuthorizationRequest, string, string, string, Uri, Uri) Constructor

Represents an error response for an authorization request, detailing the nature of the error.

public AuthorizationError(Abblix.Oidc.Server.Model.AuthorizationRequest Model, string Error, string ErrorDescription, string ResponseMode, System.Uri? RedirectUri, System.Uri? ErrorUri=null);

Parameters

Model AuthorizationRequest

The original authorization request model that led to this error.

Error System.String

A single error code from the OAuth 2.0 specification that describes the error.

ErrorDescription System.String

A more detailed description of the error for debugging purposes.

ResponseMode System.String

The response mode to be used for returning parameters to the client. This can influence how the error information is transmitted back to the client.

RedirectUri System.Uri

The URI to which the response should be sent. This is where the error information will be transmitted if applicable.

ErrorUri System.Uri

A URI identifying a human-readable web page with information about the error.

Remarks

This record encapsulates information about errors encountered during the processing of an authorization request. It includes details that can be returned to the client to indicate what went wrong. This structure facilitates compliance with OAuth 2.0 and OpenID Connect specifications by providing a standardized format for error reporting.

This is the response-stage error type, a variant of the AuthorizationResponse polymorphic hierarchy alongside LoginRequired, ConsentRequired, SuccessfullyAuthenticated etc. The validator pipeline produces the lighter AuthorizationRequestValidationError; this type wraps it (via the secondary constructor) with the originating Model needed for state propagation through the formatter, plus the optional error_uri.

Two parallel error types exist because of the layered architecture: the validator pipeline operates on the generic Abblix.Utils.Result<> envelope and stays free of response-level concerns. The cost is field duplication (Error, ErrorDescription, ResponseMode, RedirectUri) — accepted for the architectural seam.

Properties

AuthorizationError.Error Property

A single error code from the OAuth 2.0 specification that describes the error.

public string Error { get; init; }

Property Value

System.String

AuthorizationError.ErrorDescription Property

A more detailed description of the error for debugging purposes.

public string ErrorDescription { get; init; }

Property Value

System.String

AuthorizationError.ErrorUri Property

A URI identifying a human-readable web page with information about the error.

public System.Uri? ErrorUri { get; init; }

Property Value

System.Uri

AuthorizationError.RedirectUri Property

The URI to which the response should be sent. This is where the error information will be transmitted if applicable.

public System.Uri? RedirectUri { get; init; }

Property Value

System.Uri