Saml2SecurityTokenHandler.WriteToken Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WriteToken(SecurityToken) |
Serializes a Saml2SecurityToken to a string. |
WriteToken(XmlWriter, SecurityToken) |
Writes a Saml2SecurityToken using the XmlWriter. |
WriteToken(SecurityToken)
Serializes a Saml2SecurityToken to a string.
public override string WriteToken (Microsoft.IdentityModel.Tokens.SecurityToken securityToken);
override this.WriteToken : Microsoft.IdentityModel.Tokens.SecurityToken -> string
Public Overrides Function WriteToken (securityToken As SecurityToken) As String
Parameters
- securityToken
- SecurityToken
Returns
Exceptions
If the securityToken
is null.
If securityToken
is not a Saml2SecurityToken.
Applies to
WriteToken(XmlWriter, SecurityToken)
Writes a Saml2SecurityToken using the XmlWriter.
public override void WriteToken (System.Xml.XmlWriter writer, Microsoft.IdentityModel.Tokens.SecurityToken securityToken);
override this.WriteToken : System.Xml.XmlWriter * Microsoft.IdentityModel.Tokens.SecurityToken -> unit
Public Overrides Sub WriteToken (writer As XmlWriter, securityToken As SecurityToken)
Parameters
- writer
- XmlWriter
A XmlWriter to serialize the SecurityToken.
- securityToken
- SecurityToken
The SecurityToken to serialize.
Exceptions
If Assertion is null.
If securityToken
is not a Saml2SecurityToken.