SamlSerializer 类
定义
在 SamlSecurityToken 对象和 XML 文档之间进行序列化和反序列化操作。Serializes and deserializes SamlSecurityToken objects into and from XML documents.
public ref class SamlSerializer
public class SamlSerializer
type SamlSerializer = class
Public Class SamlSerializer
- 继承
-
SamlSerializer
注解
XML 序列化是将对象的公共属性和字段转换为序列格式(这里是指 XML)以便存储或传输的过程。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. 反序列化则是从 XML 中重新创建原始状态的对象。Deserialization re-creates the object in its original state from the XML.
SamlSerializer 类可将 SAML 安全令牌序列化和反序列化,这些令牌具有可扩展格式。The SamlSerializer class serializes and deserializes SAML security tokens, which have an extensible format. 和许多其他安全令牌不同,SamlSecurityToken 安全令牌包括可按应用程序需要进行自定义的 XML 元素和属性。Unlike many other security tokens, SamlSecurityToken security tokens include XML elements and attributes that can be customized for an application's needs. SAML 断言的部分可扩展点包括 <saml:Advice>、<saml:Condition> 和 <saml:Statement> 元素。Some of the extensibility points for a SAML assertion include the <saml:Advice>, <saml:Condition>, and <saml:Statement> elements. 有关重写这些元素的读取方式的详细信息,请参见 LoadAdvice(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver)、LoadCondition(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) 和 LoadStatement(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) 方法。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.
构造函数
| SamlSerializer() |
初始化 SamlSerializer 类的新实例。Initializes a new instance of the SamlSerializer class. |
方法
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| LoadAdvice(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) |
使用指定 XML 读取器读取 SAML 断言的 |
| LoadAssertion(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) |
从指定的 XML 读取器读取 SAML 断言。Reads a SAML assertion from the specified XML reader. |
| LoadAttribute(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) |
使用指定的 XML 阅读器读取 SAML 安全令牌主题的属性。Reads an attribute of the subject of a SAML security token using the specified XML reader. |
| LoadCondition(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) |
使用指定的 XML 读取器读取评估 SAML 断言有效性时必须考虑的条件。Reads a condition that must be taken into account when assessing the validity of a SAML assertion using the specified XML reader. |
| LoadConditions(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) |
使用指定的 XML 读取器读取评估 SAML 断言有效性时必须考虑的条件集。Reads a set of conditions that must be taken into account when assessing the validity of a SAML assertion using the specified XML reader. |
| LoadStatement(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) |
使用指定的 XML 读取器读取 SAML 语句。Reads a SAML statement using the specified XML reader. |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| PopulateDictionary(IXmlDictionary) |
将此序列化程序能识别的 XML 元素和属性默认集替换为指定的元素和属性字典。Replaces the default set of XML elements and attributes that are recognized by this serializer with the specified dictionary of elements and attributes. |
| ReadToken(XmlReader, SecurityTokenSerializer, SecurityTokenResolver) |
从指定的 XML 读取器读取 SAML 安全令牌。Reads a SAML security token from the specified XML reader. |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |
| WriteToken(SamlSecurityToken, XmlWriter, SecurityTokenSerializer) |
将指定的 SAML 安全令牌写入指定的 XML 序列化程序。Writes the specified SAML security token into the specified XML serializer. |