Class AuthnStatement
Represents an authentication statement.
Inheritance
Implements
Inherited Members
Namespace: ComponentSpace.SAML2.Assertions
Assembly: ComponentSpace.Saml2.dll
Syntax
public class AuthnStatement : IStatement
Remarks
Refer to the Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Constructors
AuthnStatement()
Initializes a new instance of the AuthnStatement
class.
Declaration
public AuthnStatement()
Remarks
The authentication statement is initialized with an authentication instant of now.
AuthnStatement(XmlElement)
Initializes a new instance of the AuthnStatement
class from XML.
Declaration
public AuthnStatement(XmlElement xmlElement)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlElement | The authentication statement XML. |
Exceptions
Type | Condition |
---|---|
SAMLSerializationException | Thrown when the XML deserialization fails. |
Properties
AuthnContext
Gets or sets the authentication context.
Declaration
public AuthnContext AuthnContext { get; set; }
Property Value
Type | Description |
---|---|
AuthnContext | The authentication context. |
AuthnInstant
Gets or sets the authentication instant.
Declaration
public DateTime AuthnInstant { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The authentication instant as coordinated universal time (UTC). A value of DateTime.MinValue indicates the value has not been set. |
SessionIndex
Gets or sets the session index.
Declaration
public string SessionIndex { get; set; }
Property Value
Type | Description |
---|---|
System.String | The session index. |
SessionNotOnOrAfter
Gets or sets the session not on or after time.
Declaration
public DateTime SessionNotOnOrAfter { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The session not on or after time as coordinated universal time (UTC). A value of DateTime.MaxValue indicates the value has not been set. |
SubjectLocality
Gets or sets the subject locality.
Declaration
public SubjectLocality SubjectLocality { get; set; }
Property Value
Type | Description |
---|---|
SubjectLocality | The subject locality. |
Methods
IsValid(XmlElement)
Indicates whether the XML is an authentication statement.
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 statement to XML.
Declaration
public XmlElement ToXml(XmlDocument xmlDocument)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlDocument | xmlDocument | The owning XML document. |
Returns
Type | Description |
---|---|
System.Xml.XmlElement | The authentication statement as XML. |
Exceptions
Type | Condition |
---|---|
SAMLSerializationException | Thrown when the XML serialization fails. |