SecurityTokenElement 构造函数

定义

初始化 SecurityTokenElement 类的新实例。Initializes a new instance of the SecurityTokenElement class.

重载

SecurityTokenElement(SecurityToken)

使用 SecurityTokenElement 对象初始化 SecurityToken 类的新实例。Initializes a new instance of the SecurityTokenElement class by using a SecurityToken object.

SecurityTokenElement(XmlElement, SecurityTokenHandlerCollection)

使用安全标识符 (XML) 的指定二进制表示形式初始化 SecurityTokenElement 类的新实例。Initializes a new instance of the SecurityTokenElement class by using the specified XML representation of a security token.

SecurityTokenElement(SecurityToken)

使用 SecurityTokenElement 对象初始化 SecurityToken 类的新实例。Initializes a new instance of the SecurityTokenElement class by using a SecurityToken object.

public:
 SecurityTokenElement(System::IdentityModel::Tokens::SecurityToken ^ securityToken);
public SecurityTokenElement (System.IdentityModel.Tokens.SecurityToken securityToken);
new System.IdentityModel.Tokens.SecurityTokenElement : System.IdentityModel.Tokens.SecurityToken -> System.IdentityModel.Tokens.SecurityTokenElement
Public Sub New (securityToken As SecurityToken)

参数

securityToken
SecurityToken

新实例表示的安全标记。The security token that the new instance represents.

注解

使用此构造函数时, GetIdentities 新的实例不支持方法,除非 ValidateToken 重写方法。When this constructor is used, the GetIdentities method is not supported by the new instance unless the ValidateToken method is overridden.

如果 securityToken 参数是的实例, GenericXmlSecurityToken 则将 SecurityTokenXml 属性设置为属性的值 GenericXmlSecurityToken.TokenXmlIf the securityToken parameter is an instance of GenericXmlSecurityToken then the SecurityTokenXml property is set to the value of the GenericXmlSecurityToken.TokenXml property.

适用于

SecurityTokenElement(XmlElement, SecurityTokenHandlerCollection)

使用安全标识符 (XML) 的指定二进制表示形式初始化 SecurityTokenElement 类的新实例。Initializes a new instance of the SecurityTokenElement class by using the specified XML representation of a security token.

public:
 SecurityTokenElement(System::Xml::XmlElement ^ securityTokenXml, System::IdentityModel::Tokens::SecurityTokenHandlerCollection ^ securityTokenHandlers);
public SecurityTokenElement (System.Xml.XmlElement securityTokenXml, System.IdentityModel.Tokens.SecurityTokenHandlerCollection securityTokenHandlers);
new System.IdentityModel.Tokens.SecurityTokenElement : System.Xml.XmlElement * System.IdentityModel.Tokens.SecurityTokenHandlerCollection -> System.IdentityModel.Tokens.SecurityTokenElement
Public Sub New (securityTokenXml As XmlElement, securityTokenHandlers As SecurityTokenHandlerCollection)

参数

securityTokenXml
XmlElement

安全令牌的 XML 表现形式。The XML representation of the security token.

securityTokenHandlers
SecurityTokenHandlerCollection

用于读取和验证由新实例包装的安全标记的默认标记处理程序集合。The default token handler collection that is used to read and validate the security token wrapped by the new instance.

适用于