SecurityTokenHandlerCollection.CanReadToken Method

Definition

Returns a value that indicates whether a specified token can be read by one of the handlers in the collection.

Overloads

CanReadToken(String)

Returns a value that indicates whether the specified string representation of a token can be read by one of the handlers in this collection.

CanReadToken(XmlReader)

Returns a value that indicates whether the specified token can be read by one of the handlers in this collection.

CanReadToken(String)

Returns a value that indicates whether the specified string representation of a token can be read by one of the handlers in this collection.

public bool CanReadToken (string tokenString);

Parameters

tokenString
String

The token represented as a string.

Returns

true if the collection contains a token handler that can read the specified token; otherwise false.

Exceptions

tokenString is null or an empty string.

Remarks

The method invokes the SecurityTokenHandler.CanReadToken(String) method on the token handlers (SecurityTokenHandler) in the collection to determine whether the token can be read.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CanReadToken(XmlReader)

Returns a value that indicates whether the specified token can be read by one of the handlers in this collection.

public bool CanReadToken (System.Xml.XmlReader reader);

Parameters

reader
XmlReader

An XML reader positioned at the start element. The reader should not be advanced.

Returns

true if the token can be read; otherwise false.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1