SessionSecurityTokenHandler.ReadToken Method (XmlReader)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Reads the SessionSecurityToken using the specified XML reader.

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

public override SecurityToken ReadToken(
	XmlReader reader
)

Parameters

reader
Type: System.Xml.XmlReader

The XmlReader over the incoming SecurityToken.

Return Value

Type: System.IdentityModel.Tokens.SecurityToken

The session security token that was read, an instance of SessionSecurityToken.

Exception Condition
ArgumentNullException

reader is null.

SecurityTokenException

The reader is not positioned at a SessionSecurityToken or the SessionSecurityToken cannot be read.

The reader must be positioned at either a WS-Secure Conversation Feb2005 or a WS-Secure Conversation 1.3 <wsc:SecurityContextToken> element.

The default implementation invokes the SessionSecurityTokenHandler.ReadToken(XmlReader, SecurityTokenResolver) method using a default token resolver.

.NET Framework
Available since 4.5
Return to top
Show: