Επεξεργασία

Κοινή χρήση μέσω


Saml2SecurityTokenHandler.WriteAssertion(XmlWriter, Saml2Assertion) Method

Definition

Serializes the specified SAML assertion to the specified XML writer.

protected:
 virtual void WriteAssertion(System::Xml::XmlWriter ^ writer, System::IdentityModel::Tokens::Saml2Assertion ^ data);
protected virtual void WriteAssertion (System.Xml.XmlWriter writer, System.IdentityModel.Tokens.Saml2Assertion data);
abstract member WriteAssertion : System.Xml.XmlWriter * System.IdentityModel.Tokens.Saml2Assertion -> unit
override this.WriteAssertion : System.Xml.XmlWriter * System.IdentityModel.Tokens.Saml2Assertion -> unit
Protected Overridable Sub WriteAssertion (writer As XmlWriter, data As Saml2Assertion)

Parameters

writer
XmlWriter

The XmlWriter to use for the serialization.

data
Saml2Assertion

A Saml2Assertion that represents the assertion to serialize.

Exceptions

writer is null.

-or-

data is null.

The ExternalEncryptedKeys property of the assertion specified by data is either null or has no elements.

-or-

There are no statements and no subject in the assertion specified by data. (Both the Subject property and the Statements property are null.) If an assertion does not contain statements, it must contain a subject.

-or-

The assertion specified by data contains an authentication, attribute, or authorization decision statement and no subject - these statements require a subject. (The Statements property contains a statement of type Saml2AttributeStatement, Saml2AuthenticationStatement, or Saml2AuthorizationDecisionStatement and the Subject property is null).

The token encrypting credentials do not have a Symmetric Key specified.

Applies to