Table of Contents

Class SamlAuthnRequestValidationResult

Namespace
Fdyay.IdentityServer.Saml.Idp
Assembly
Fdyay.IdentityServer.Saml.dll

The outcome of validating an inbound AuthnRequest.

public sealed class SamlAuthnRequestValidationResult
Inheritance
SamlAuthnRequestValidationResult
Inherited Members

Properties

AssertionConsumerService

The assertion consumer service the response is delivered to, chosen from the request. Duende's.

public IndexedEndpoint? AssertionConsumerService { get; }

Property Value

IndexedEndpoint

Error

The error code of the check that failed; null on success.

public string? Error { get; }

Property Value

string

ErrorDescription

What to show for Error, when the check that failed said; else the endpoint describes the code.

public string? ErrorDescription { get; }

Property Value

string

Request

The request that passed; null on failure.

public SamlAuthnRequest? Request { get; }

Property Value

SamlAuthnRequest

RequestedClaimTypes

The claim types the profile service is asked for, from ISamlResourceResolver; none when not resolved. Duende's.

public IReadOnlyList<string> RequestedClaimTypes { get; }

Property Value

IReadOnlyList<string>

ServiceProvider

The registration of the service provider that sent the request; null on failure.

public SamlServiceProvider? ServiceProvider { get; }

Property Value

SamlServiceProvider

Succeeded

Whether the request passed; when false, Error says why.

public bool Succeeded { get; }

Property Value

bool

ValidatedResources

The identity resources the provider's allowed scopes named, from ISamlResourceResolver. Duende's.

public ResourceValidationResult? ValidatedResources { get; }

Property Value

ResourceValidationResult

Methods

Fail(string)

A refusal the endpoint describes from its code.

public static SamlAuthnRequestValidationResult Fail(string error)

Parameters

error string

The error code.

Returns

SamlAuthnRequestValidationResult

A result with Succeeded false.

Fail(string, string?)

A refusal with the description the error page shows, as Duende's resource resolution failure carries one.

public static SamlAuthnRequestValidationResult Fail(string error, string? errorDescription)

Parameters

error string
errorDescription string

Returns

SamlAuthnRequestValidationResult

Success(SamlAuthnRequest, SamlServiceProvider)

A request answered with no attributes: nothing resolved what its provider may be issued.

public static SamlAuthnRequestValidationResult Success(SamlAuthnRequest request, SamlServiceProvider serviceProvider)

Parameters

request SamlAuthnRequest
serviceProvider SamlServiceProvider

Returns

SamlAuthnRequestValidationResult

Remarks

Answered at the provider's default assertion consumer service.

Success(SamlAuthnRequest, SamlServiceProvider, IndexedEndpoint?, SamlResourceResolutionResult?)

A request answered at assertionConsumerService, with what its provider may be issued when resolved.

public static SamlAuthnRequestValidationResult Success(SamlAuthnRequest request, SamlServiceProvider serviceProvider, IndexedEndpoint? assertionConsumerService, SamlResourceResolutionResult? resources)

Parameters

request SamlAuthnRequest

The AuthnRequest that passed validation.

serviceProvider SamlServiceProvider

The registration of the service provider that sent it.

assertionConsumerService IndexedEndpoint

The endpoint chosen from the request; the provider's default when null.

resources SamlResourceResolutionResult

What the provider may be issued; when null, nothing was resolved and no attributes are asked for.

Returns

SamlAuthnRequestValidationResult

Success(SamlAuthnRequest, SamlServiceProvider, SamlResourceResolutionResult)

A request whose provider's claim types were resolved, to be asked of the profile service.

public static SamlAuthnRequestValidationResult Success(SamlAuthnRequest request, SamlServiceProvider serviceProvider, SamlResourceResolutionResult resources)

Parameters

request SamlAuthnRequest
serviceProvider SamlServiceProvider
resources SamlResourceResolutionResult

Returns

SamlAuthnRequestValidationResult

Remarks

Answered at the provider's default assertion consumer service.