Table of Contents

Class SubjectConfirmationData

Namespace
ComponentSpace.Saml2.Assertions
Assembly
ComponentSpace.Saml2.dll

Represents subject confirmation data.

public class SubjectConfirmationData
Inheritance
SubjectConfirmationData
Inherited Members

Remarks

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

Constructors

SubjectConfirmationData()

Initializes a new instance of the SubjectConfirmationData class.

public SubjectConfirmationData()

SubjectConfirmationData(TimeSpan)

Initializes a new instance of the SubjectConfirmationData class.

public SubjectConfirmationData(TimeSpan timeSpan)

Parameters

timeSpan TimeSpan

The timespan before and after now.

Remarks

The not before time is calculated as the current UTC time less the time span. The not on or after time is calculated as the current UTC time plus the time span.

SubjectConfirmationData(XmlElement)

Initializes a new instance of the SubjectConfirmationData class from XML.

public SubjectConfirmationData(XmlElement xmlElement)

Parameters

xmlElement XmlElement

The subject confirmation data XML.

Exceptions

SamlSerializationException

Thrown when the XML deserialization fails.

Properties

Address

Gets or sets the address.

public string Address { get; set; }

Property Value

string

The address.

Data

Gets or sets the data.

public IEnumerable<XmlElement> Data { get; set; }

Property Value

IEnumerable<XmlElement>

The data.

InResponseTo

Gets or sets the in response to value.

public string InResponseTo { get; set; }

Property Value

string

The in response to value.

NotBefore

Gets or sets the not before time.

public DateTime? NotBefore { get; set; }

Property Value

DateTime?

The not before time as coordinated universal time (UTC).

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).

Recipient

Gets or sets the recipient.

public string Recipient { get; set; }

Property Value

string

The recipient.

XmlAttributes

Gets or sets the XML attributes keyed by named and containing the XML attribute values.

public IDictionary<string, string> XmlAttributes { get; set; }

Property Value

IDictionary<string, string>

The XML attributes keyed by named and containing the XML attribute values.

Methods

IsValid(XmlElement)

Indicates whether the XML is subject confirmation data.

public static bool IsValid(XmlElement xmlElement)

Parameters

xmlElement XmlElement

The XML to test.

Returns

bool

true if the XML is subject confirmation data; otherwise false.

IsWithinTimePeriod()

Indicates whether the current UTC time is within the not before and not on or after period, if specified.

public bool IsWithinTimePeriod()

Returns

bool

true if within the time period; otherwise false.

Remarks

To be within the time period, not before > UTC now >= not on or after

IsWithinTimePeriod(TimeSpan)

Indicates whether the current UTC time is within the not before and not on or after period, if specified. The supplied time span is to allow for clock skew.

public bool IsWithinTimePeriod(TimeSpan clockSkew)

Parameters

clockSkew TimeSpan

The time span to allow for clock skew.

Returns

bool

true if within the time period; otherwise false.

Remarks

To be within the time period, not before - clock skew > UTC now >= not on or after + clock skew

ToXml(XmlDocument)

Serializes the subject confirmation data to XML.

public XmlElement ToXml(XmlDocument xmlDocument)

Parameters

xmlDocument XmlDocument

The owning XML document.

Returns

XmlElement

The subject confirmation data as XML.

Exceptions

SamlSerializationException

Thrown when the XML serialization fails.