Table of Contents

Class SamlValidationResult

Namespace
Fdyay.IdentityServer.Saml.Validation
Assembly
Fdyay.IdentityServer.Saml.dll

The outcome of validating a SAML response.

public sealed class SamlValidationResult
Inheritance
SamlValidationResult
Inherited Members

Properties

Attributes

The attributes of the response's assertion; empty on failure.

public IReadOnlyList<SamlAttribute> Attributes { get; }

Property Value

IReadOnlyList<SamlAttribute>

Error

The failure code, such as invalid_signature or status: followed by the response's status codes; null on success.

public string? Error { get; }

Property Value

string

Response

The response that passed; null on failure.

public SamlResponse? Response { get; }

Property Value

SamlResponse

Subject

The NameID of the response's assertion; null on failure.

public SamlNameId? Subject { get; }

Property Value

SamlNameId

Succeeded

Whether the response passed every check; when false, Error says which failed.

public bool Succeeded { get; }

Property Value

bool

Methods

Fail(string)

A refusal.

public static SamlValidationResult Fail(string error)

Parameters

error string

The failure code.

Returns

SamlValidationResult

A result with Succeeded false.

Success(SamlResponse)

A response that passed.

public static SamlValidationResult Success(SamlResponse response)

Parameters

response SamlResponse

The validated response.

Returns

SamlValidationResult

A result with Succeeded true.