SecurityTokenElement Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the SecurityTokenElement class.
Overloads
SecurityTokenElement(SecurityToken) |
Initializes a new instance of the SecurityTokenElement class by using a SecurityToken object. |
SecurityTokenElement(XmlElement, SecurityTokenHandlerCollection) |
Initializes a new instance of the SecurityTokenElement class by using the specified XML representation of a security token. |
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)
Parameters
- securityToken
- SecurityToken
The security token that the new instance represents.
Remarks
When this constructor is used, the GetIdentities method is not supported by the new instance unless the ValidateToken method is overridden.
If the securityToken
parameter is an instance of GenericXmlSecurityToken then the SecurityTokenXml property is set to the value of the GenericXmlSecurityToken.TokenXml property.
Applies to
SecurityTokenElement(XmlElement, SecurityTokenHandlerCollection)
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)
Parameters
- securityTokenXml
- XmlElement
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.