Class AuthnRequest
Represents an authentication request.
Inherited Members
Namespace: ComponentSpace.Saml2.Protocols
Assembly: ComponentSpace.Saml2.dll
Syntax
public class AuthnRequest : RequestAbstractType
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.
Declaration
public AuthnRequest()
AuthnRequest(XmlElement)
Initializes a new instance of the AuthnRequest
class from XML.
Declaration
public AuthnRequest(XmlElement xmlElement)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlElement | The authentication request XML. |
Exceptions
Type | Condition |
---|---|
SamlSerializationException | Thrown when the XML deserialization fails. |
Properties
AssertionConsumerServiceIndex
Gets or sets the assertion consumer service index.
Declaration
public int? AssertionConsumerServiceIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The assertion consumer service index. |
AssertionConsumerServiceUrl
Gets or sets the assertion consumer service URL.
Declaration
public string AssertionConsumerServiceUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | The assertion consumer service URL. |
AttributeConsumingServiceIndex
Gets or sets the attribute consuming service index.
Declaration
public int? AttributeConsumingServiceIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The attribute consuming service index. |
Conditions
Gets or sets the conditions.
Declaration
public Conditions Conditions { get; set; }
Property Value
Type | Description |
---|---|
Conditions | The conditions. |
ForceAuthn
Gets or sets the force authentication flag.
Declaration
public bool? ForceAuthn { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | The force authentication flag. |
IsPassive
Gets or sets the is passive flag.
Declaration
public bool? IsPassive { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | The is passive flag. |
NameIDPolicy
Gets or sets the name ID policy.
Declaration
public NameIDPolicy NameIDPolicy { get; set; }
Property Value
Type | Description |
---|---|
NameIDPolicy | The name ID policy. |
ProtocolBinding
Gets or sets the protocol binding.
Declaration
public string ProtocolBinding { get; set; }
Property Value
Type | Description |
---|---|
System.String | The protocol binding. |
ProviderName
Gets or sets the provider name.
Declaration
public string ProviderName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The provider name. |
RequestedAuthnContext
Gets or sets the requested authentication context.
Declaration
public RequestedAuthnContext RequestedAuthnContext { get; set; }
Property Value
Type | Description |
---|---|
RequestedAuthnContext | The requested authentication context. |
Scoping
Gets or sets the scoping.
Declaration
public Scoping Scoping { get; set; }
Property Value
Type | Description |
---|---|
Scoping | The scoping. |
Subject
Gets or sets the subject.
Declaration
public Subject Subject { get; set; }
Property Value
Type | Description |
---|---|
Subject | The subject. |
Methods
IsValid(XmlElement)
Indicates whether the XML is an authentication request.
Declaration
public static bool IsValid(XmlElement xmlElement)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlElement | The XML to test. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ToXml(XmlDocument)
Serializes the authentication request to XML.
Declaration
public override XmlElement ToXml(XmlDocument xmlDocument)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlDocument | xmlDocument | The owning XML document. |
Returns
Type | Description |
---|---|
System.Xml.XmlElement | The authentication request as XML. |
Overrides
Exceptions
Type | Condition |
---|---|
SamlSerializationException | Thrown when the XML serialization fails. |