Export (0) Print
Expand All

UserNameSecurityTokenHandler.ReadToken Method (XmlReader)

.NET Framework 4.5

Reads a UserNameSecurityToken from the specified reader.

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

public override SecurityToken ReadToken(
	XmlReader reader
)

Parameters

reader
Type: System.Xml.XmlReader

An XML reader positioned at the start element of the token.

Return Value

Type: System.IdentityModel.Tokens.SecurityToken
The username security token that was deserialized from the XML.

ExceptionCondition
ArgumentNullException

reader is null.

XmlException

The token cannot be read.

NotSupportedException

The password was not in plain text format.

InvalidOperationException

An unknown element was found in the security token or the username was not specified.

.NET Framework

Supported in: 4.6
Show:
© 2014 Microsoft