SecurityTokenElement Constructor (SecurityToken)

.NET Framework (current version)
 

Initializes a new instance of the SecurityTokenElement class by using a SecurityToken object.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public SecurityTokenElement(
	SecurityToken securityToken
)

Parameters

securityToken
Type: System.IdentityModel.Tokens.SecurityToken

The security token that the new instance represents.

When this constructor is used, the GetIdentities method is not supported by the new instance unless the M:System.IdentityModel.Tokens.SecurityTokenElement.CreateSubject(System.Xml.XmlElement,System.IdentityModel.Tokens.SecurityTokenHandlerCollection) 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.

.NET Framework
Available since 4.5
Return to top
Show: