Table of Contents

Class AuthnRequest

Namespace
ComponentSpace.Saml2.Protocols
Assembly
ComponentSpace.Saml2.dll

Represents an authentication request.

public class AuthnRequest : RequestAbstractType
Inheritance
AuthnRequest
Inherited Members

Remarks

Refer to the Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.

Constructors

AuthnRequest()

Initializes a new instance of the AuthnRequest class.

public AuthnRequest()

AuthnRequest(XmlElement)

Initializes a new instance of the AuthnRequest class from XML.

public AuthnRequest(XmlElement xmlElement)

Parameters

xmlElement XmlElement

The authentication request XML.

Exceptions

SamlSerializationException

Thrown when the XML deserialization fails.

Properties

AssertionConsumerServiceIndex

Gets or sets the assertion consumer service index.

public int? AssertionConsumerServiceIndex { get; set; }

Property Value

int?

The assertion consumer service index.

AssertionConsumerServiceUrl

Gets or sets the assertion consumer service URL.

public string AssertionConsumerServiceUrl { get; set; }

Property Value

string

The assertion consumer service URL.

AttributeConsumingServiceIndex

Gets or sets the attribute consuming service index.

public int? AttributeConsumingServiceIndex { get; set; }

Property Value

int?

The attribute consuming service index.

Conditions

Gets or sets the conditions.

public Conditions Conditions { get; set; }

Property Value

Conditions

The conditions.

ForceAuthn

Gets or sets the force authentication flag.

public bool? ForceAuthn { get; set; }

Property Value

bool?

The force authentication flag.

IsPassive

Gets or sets the is passive flag.

public bool? IsPassive { get; set; }

Property Value

bool?

The is passive flag.

NameIDPolicy

Gets or sets the name ID policy.

public NameIDPolicy NameIDPolicy { get; set; }

Property Value

NameIDPolicy

The name ID policy.

ProtocolBinding

Gets or sets the protocol binding.

public string ProtocolBinding { get; set; }

Property Value

string

The protocol binding.

ProviderName

Gets or sets the provider name.

public string ProviderName { get; set; }

Property Value

string

The provider name.

RequestedAuthnContext

Gets or sets the requested authentication context.

public RequestedAuthnContext RequestedAuthnContext { get; set; }

Property Value

RequestedAuthnContext

The requested authentication context.

Scoping

Gets or sets the scoping.

public Scoping Scoping { get; set; }

Property Value

Scoping

The scoping.

Subject

Gets or sets the subject.

public Subject Subject { get; set; }

Property Value

Subject

The subject.

Methods

IsValid(XmlElement)

Indicates whether the XML is an authentication request.

public static bool IsValid(XmlElement xmlElement)

Parameters

xmlElement XmlElement

The XML to test.

Returns

bool

true if the XML is an authentication request; otherwise false.

ToXml(XmlDocument)

Serializes the authentication request to XML.

public override XmlElement ToXml(XmlDocument xmlDocument)

Parameters

xmlDocument XmlDocument

The owning XML document.

Returns

XmlElement

The authentication request as XML.

Exceptions

SamlSerializationException

Thrown when the XML serialization fails.