Table of Contents

Class NameIdGenerationResult

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

A generated NameID, or why there is none.

public sealed class NameIdGenerationResult
Inheritance
NameIdGenerationResult
Inherited Members

Properties

Error

The status a refusal carries: a first- and second-level code and a message.

public SamlStatus? Error { get; }

Property Value

SamlStatus

IsError

Whether generation was refused, with Error saying how.

public bool IsError { get; }

Property Value

bool

NameId

The NameID to issue; null when IsError.

public SamlNameId? NameId { get; }

Property Value

SamlNameId

Methods

Failure(string, string?, string)

A refusal, carried to the service provider as a SAML status.

public static NameIdGenerationResult Failure(string statusCode, string? subStatusCode, string message)

Parameters

statusCode string

The top-level status code, such as Responder.

subStatusCode string

The second-level status code, such as InvalidNameIdPolicy, or null for none.

message string

What went wrong, for this server's error page.

Returns

NameIdGenerationResult

A result with no NameID and Error set.

Success(SamlNameId)

A generated NameID.

public static NameIdGenerationResult Success(SamlNameId nameId)

Parameters

nameId SamlNameId

The NameID to issue.

Returns

NameIdGenerationResult

A result whose NameId is nameId.

Exceptions

ArgumentNullException

nameId is null.