Class LogoutRequest
- Namespace
- ComponentSpace.Saml2.Protocols
- Assembly
- ComponentSpace.Saml2.dll
Represents a logout request.
public class LogoutRequest : RequestAbstractType
- Inheritance
-
LogoutRequest
- Inherited Members
Remarks
Refer to the Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Constructors
LogoutRequest()
Initializes a new instance of the LogoutRequest class.
public LogoutRequest()
LogoutRequest(XmlElement)
Initializes a new instance of the LogoutRequest class from XML.
public LogoutRequest(XmlElement xmlElement)
Parameters
xmlElementXmlElementThe logout request XML.
Exceptions
- SamlSerializationException
Thrown when the XML deserialization fails.
Properties
BaseID
Gets or sets the base ID.
public BaseID BaseID { get; set; }
Property Value
- BaseID
The base ID.
EncryptedID
Gets or sets the encrypted ID.
public EncryptedID EncryptedID { get; set; }
Property Value
- EncryptedID
The encrypted ID.
NameID
Gets or sets the name ID.
public NameID NameID { get; set; }
Property Value
- NameID
The name ID.
NotOnOrAfter
Gets or sets the not on or after time.
public DateTime? NotOnOrAfter { get; set; }
Property Value
- DateTime?
The not on or after time as coordinated universal time (UTC).
Reason
Gets or sets the reason.
public string Reason { get; set; }
Property Value
- string
The reason.
SessionIndexes
Gets or sets the session indexes.
public IList<SessionIndex> SessionIndexes { get; set; }
Property Value
- IList<SessionIndex>
The session indexes.
Methods
IsValid(XmlElement)
Indicates whether the XML is a logout request.
public static bool IsValid(XmlElement xmlElement)
Parameters
xmlElementXmlElementThe XML to test.
Returns
- bool
trueif the XML is a logout request; otherwisefalse.
IsWithinTimePeriod()
Indicates whether the current UTC time is within the not on or after period, if specified.
public bool IsWithinTimePeriod()
Returns
- bool
trueif within the time period; otherwisefalse.
Remarks
To be within the time period, UTC now <= not on or after
IsWithinTimePeriod(TimeSpan)
Indicates whether the current UTC time is within the not on or after period, if specified. The supplied time span is to allow for clock skew.
public bool IsWithinTimePeriod(TimeSpan clockSkew)
Parameters
clockSkewTimeSpanThe time span to allow for clock skew.
Returns
- bool
trueif within the time period; otherwisefalse.
Remarks
To be within the time period, UTC now <= not on or after + clock skew
ToXml(XmlDocument)
Serializes the logout request to XML.
public override XmlElement ToXml(XmlDocument xmlDocument)
Parameters
xmlDocumentXmlDocumentThe owning XML document.
Returns
- XmlElement
The logout request as XML.
Exceptions
- SamlSerializationException
Thrown when the XML serialization fails.