Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SecurityTokenSerializer Class

Represents a class that can read and write key identifiers, key identifier clauses, and security tokens.

System.Object
  System.IdentityModel.Selectors.SecurityTokenSerializer
    System.ServiceModel.Security.WSSecurityTokenSerializer

Namespace:  System.IdentityModel.Selectors
Assembly:  System.IdentityModel (in System.IdentityModel.dll)
public abstract class SecurityTokenSerializer

The SecurityTokenSerializer type exposes the following members.

  NameDescription
Protected methodSecurityTokenSerializerInitializes a new instance of the SecurityTokenSerializer class.
Top
  NameDescription
Public methodCanReadKeyIdentifierDetermines whether this serializer can read the <KeyIdentifier> element referred to by the specified XML reader.
Public methodCanReadKeyIdentifierClauseDetermines whether this serializer can read a clause in a <KeyIdentifier> element referred to by the specified XML reader.
Protected methodCanReadKeyIdentifierClauseCoreDetermines whether this serializer can read the <KeyIdentifier> element referred to by the specified XML reader. Called by the base class.
Protected methodCanReadKeyIdentifierCoreDetermines whether this serializer can read the <KeyIdentifier> element referred to by the specified XML reader. Called by the base class.
Public methodCanReadTokenDetermines whether this serializer can read the security token pointed at by the specified XML reader.
Protected methodCanReadTokenCoreDetermines whether this serializer can read the security token pointed at by the specified XML reader. Called by the base class.
Public methodCanWriteKeyIdentifierDetermines whether this serializer can write the specified key identifier.
Public methodCanWriteKeyIdentifierClauseDetermines whether this serializer can write the specified key identifier clause.
Protected methodCanWriteKeyIdentifierClauseCoreDetermines whether this serializer can write the specified key identifier clause. Called by the base class.
Protected methodCanWriteKeyIdentifierCoreDetermines whether this serializer can write the specified key identifier. Called by the base class.
Public methodCanWriteTokenDetermines whether this serializer can write the specified security token to XML.
Protected methodCanWriteTokenCoreDetermines whether this serializer can write the specified security token to XML. Called by the base class.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodReadKeyIdentifierReads the key identifier using specified XML reader.
Public methodReadKeyIdentifierClauseReads the key identifier clause using specified XML reader.
Protected methodReadKeyIdentifierClauseCoreReads the key identifier clause using specified XML reader. Called by the base class.
Protected methodReadKeyIdentifierCoreReads the key identifier clause using specified XML reader. Called by the base class.
Public methodReadTokenReads the security token pointed at by the specified XML reader.
Protected methodReadTokenCoreReads the security token pointed at by the specified XML reader. Called by the base class.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWriteKeyIdentifierWrites the specified key identifier using the specified XML writer.
Public methodWriteKeyIdentifierClauseWrites the specified key identifier clause using the specified XML writer.
Protected methodWriteKeyIdentifierClauseCoreWrites the specified key identifier clause using the specified XML writer. Called by the base class.
Protected methodWriteKeyIdentifierCoreWrites the specified key identifier using the specified XML writer. Called by the base class.
Public methodWriteTokenWrites the specified security token using the specified XML writer.
Protected methodWriteTokenCoreWrites the specified security token using the specified XML writer. Called by the base class.
Top

Use the SecurityTokenSerializer class to read and write SecurityKeyIdentifier, SecurityKeyIdentifierClause, and SecurityToken classes as XML. The SecurityTokenSerializer class has methods to determine whether this class can read and write these entities and to actually read and write them. For security tokens, these methods are CanReadToken, CanWriteToken, ReadToken, and WriteToken.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.