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

SamlSerializer Class

Serializes and deserializes SamlSecurityToken objects into and from XML documents.

System.Object
  System.IdentityModel.Tokens.SamlSerializer

Namespace:  System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)
'Declaration
Public Class SamlSerializer

The SamlSerializer type exposes the following members.

  NameDescription
Public methodSamlSerializerInitializes a new instance of the SamlSerializer class.
Top
  NameDescription
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.)
Public methodLoadAdviceReads the additional information provided by the SAML authority within a <saml:Advice> element of a SAML assertion using the specified XML reader.
Public methodLoadAssertionReads a SAML assertion from the specified XML reader.
Public methodLoadAttributeReads an attribute of the subject of a SAML security token using the specified XML reader.
Public methodLoadConditionReads a condition that must be taken into account when assessing the validity of a SAML assertion using the specified XML reader.
Public methodLoadConditionsReads a set of conditions that must be taken into account when assessing the validity of a SAML assertion using the specified XML reader.
Public methodLoadStatementReads a SAML statement using the specified XML reader.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodPopulateDictionaryReplaces the default set of XML elements and attributes that are recognized by this serializer with the specified dictionary of elements and attributes.
Public methodReadTokenReads a SAML security token from the specified XML reader.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWriteTokenWrites the specified SAML security token into the specified XML serializer.
Top

XML serialization is the process of converting an object's public properties and fields to a serial format (in this case, XML) for storage or transport. Deserialization re-creates the object in its original state from the XML.

The SamlSerializer class serializes and deserializes SAML security tokens, which have an extensible format. Unlike many other security tokens, SamlSecurityToken security tokens include XML elements and attributes that can be customized for an application's needs. Some of the extensibility points for a SAML assertion include the <saml:Advice>, <saml:Condition>, and <saml:Statement> elements. For more details about overriding how each of these elements are read, see the LoadAdvice(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver), LoadCondition(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver), and LoadStatement(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) methods.

.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.