Export (0) Print
Expand All

SamlSerializer.WriteToken Method

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

Namespace:  System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public virtual void WriteToken(
	SamlSecurityToken token,
	XmlWriter writer,
	SecurityTokenSerializer keyInfoSerializer
)

Parameters

token
Type: System.IdentityModel.Tokens.SamlSecurityToken

The SamlSecurityToken to write.

writer
Type: System.Xml.XmlWriter

An XmlDictionaryWriter to write the SAML authorization statement.

keyInfoSerializer
Type: System.IdentityModel.Selectors.SecurityTokenSerializer

A SecurityTokenSerializer that is capable of writing KeyInfo clauses.

ExceptionCondition
ArgumentNullException

writer is null

-or-

token is null

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft