Redigera

Dela via


SamlSerializer.WriteToken Method

Definition

Writes the specified SAML security token into the specified XML serializer.

public:
 virtual void WriteToken(System::IdentityModel::Tokens::SamlSecurityToken ^ token, System::Xml::XmlWriter ^ writer, System::IdentityModel::Selectors::SecurityTokenSerializer ^ keyInfoSerializer);
public virtual void WriteToken (System.IdentityModel.Tokens.SamlSecurityToken token, System.Xml.XmlWriter writer, System.IdentityModel.Selectors.SecurityTokenSerializer keyInfoSerializer);
abstract member WriteToken : System.IdentityModel.Tokens.SamlSecurityToken * System.Xml.XmlWriter * System.IdentityModel.Selectors.SecurityTokenSerializer -> unit
override this.WriteToken : System.IdentityModel.Tokens.SamlSecurityToken * System.Xml.XmlWriter * System.IdentityModel.Selectors.SecurityTokenSerializer -> unit
Public Overridable Sub WriteToken (token As SamlSecurityToken, writer As XmlWriter, keyInfoSerializer As SecurityTokenSerializer)

Parameters

token
SamlSecurityToken

The SamlSecurityToken to write.

writer
XmlWriter

An XmlDictionaryWriter to write the SAML authorization statement.

keyInfoSerializer
SecurityTokenSerializer

A SecurityTokenSerializer that is capable of writing KeyInfo clauses.

Exceptions

writer is null

-or-

token is null

Remarks

Use the WriteToken(SamlSecurityToken, XmlWriter, SecurityTokenSerializer) method to serialize a SamlSecurityToken security token. To deserialize a SamlSecurityToken use the ReadToken(XmlReader, SecurityTokenSerializer, SecurityTokenResolver) method.

Applies to