Skip to main content

ErrorFactory Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Common.Validation

ErrorFactory Class

Builds OidcError instances for the request-binding layer shared by every endpoint and both transport adapters. The counterpart of the per-area error factories (authorization validation, token grants, dynamic client registration, ...): those cover protocol-specific failures, this covers the malformed-request failures the declarative model validation surfaces before any handler runs. It sits in its own Common.Validation namespace rather than bare Common so it does not collide with those per-area ErrorFactory classes in the many core files that import Common.

public static class ErrorFactory

Inheritance System.Object → ErrorFactory

Methods

ErrorFactory.InvalidRequest(IEnumerable<string>) Method

Maps a flat sequence of model-validation messages onto an OidcError carrying the InvalidRequest code. The input is a plain message sequence on purpose, so each transport adapter can feed it the output of System.ComponentModel.DataAnnotations.Validator and share one source of truth for "a malformed request becomes invalid_request".

public static Abblix.Oidc.Server.Common.OidcError InvalidRequest(System.Collections.Generic.IEnumerable<string> messages);

Parameters

messages System.Collections.Generic.IEnumerable<System.String>

The human-readable validation messages collected for the rejected request.

Returns

OidcError
An OidcError describing the failure in OAuth terms.