Table of Contents

Class ErrorMessage

Namespace
Fdyay.IdentityServer.Models
Assembly
Fdyay.IdentityServer.AspNetCore.dll

The error context carried server-side so the error page can retrieve it by an opaque id.

public sealed class ErrorMessage
Inheritance
ErrorMessage
Inherited Members

Remarks

Nothing here is read from the query string by the page — it is looked up by id, so the values cannot be influenced by whoever crafted the link the user followed.

Fields

MaxValueLength

The longest RequestedClientId or RedirectUri kept: 2,048 characters.

public const int MaxValueLength = 2048

Field Value

int

Remarks

Both are copied from a request that was refused, often an anonymous one, into a store that keeps them for minutes, so a longer value is not kept at all — a SAML entity id is at most 1,024 characters (SAML Core §8.3.6) and a redirect URI past this length is not one a browser carries reliably. The authorize endpoint keeps them to the tighter InputLengths first. Since 0.177.0.

Properties

ActivityId

The trace the error arose in — Id — when one was being recorded. Duende's.

public string? ActivityId { get; init; }

Property Value

string

Remarks

For a host whose logs are correlated by trace rather than by request, as RequestId is for one whose are not.

CreationTime

When the error context was created.

public DateTimeOffset CreationTime { get; init; }

Property Value

DateTimeOffset

DisplayMode

The display the authorize request asked for, when it named one this server knows. Duende's.

public string? DisplayMode { get; init; }

Property Value

string

Remarks

So the error page can render as the client asked: a popup has no room for the site's chrome.

Error

The protocol error code (for example invalid_request).

public string Error { get; init; }

Property Value

string

ErrorDescription

The human-readable description of the error, if there is one.

public string? ErrorDescription { get; init; }

Property Value

string

Protocol

The protocol the failing request arrived on, one of the ErrorMessage.Protocols values. Defaults to OpenIdConnect, which is what the OIDC endpoints produce.

public string Protocol { get; init; }

Property Value

string

Remarks

saml, SAML's value until 0.157.0, is read as Saml, so an error stored by an earlier version is still labelled SAML; any other value is kept as written.

RedirectUri

The redirect URI the request asked for, when it was present — it may not be a registered one.

public string? RedirectUri { get; init; }

Property Value

string

Remarks

Null when it was longer than MaxValueLength, since 0.177.0.

RequestId

The id of the request the error arose on, so a screenshot can be matched to a log line.

public string RequestId { get; init; }

Property Value

string

RequestedClientId

The client id the request asked for, when it was present — it may be unknown to us.

public string? RequestedClientId { get; init; }

Property Value

string

Remarks

Null when it was longer than MaxValueLength, since 0.177.0.

UiLocales

The ui_locales the authorize request carried, when it carried any. Duende's.

public string? UiLocales { get; init; }

Property Value

string

Remarks

So the error page can answer in the language the client said the user reads.