Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CardSpaceSelector.GetToken Method (XmlElement, IEnumerable<XmlElement>, XmlElement, SecurityTokenSerializer)

Generates a security token using the CardSpace system and the specified endpoint, policy, token issuer, and token serializer.

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

public static GenericXmlSecurityToken GetToken(
	XmlElement endpoint,
	IEnumerable<XmlElement> policy,
	XmlElement requiredRemoteTokenIssuer,
	SecurityTokenSerializer tokenSerializer


Type: System.Xml.XmlElement

An XmlElement that represents the endpoint address of the recipient where the token is presented.

Type: System.Collections.Generic.IEnumerable<XmlElement>

An IEnumerable<T> of type XmlElement that contains a policy fragment that specifies the token types and claims that are requested by the recipient.

Type: System.Xml.XmlElement

An XmlElement that represents the issuer of the token.

Type: System.IdentityModel.Selectors.SecurityTokenSerializer

A SecurityTokenSerializer that can read a KeyInfo clause.

Return Value

Type: System.IdentityModel.Tokens.GenericXmlSecurityToken
A GenericXmlSecurityToken that represents the generated security token.


endpoint is null.


policy is null.


tokenSerializer is null.

A security token can be issued by the user or by a third party that is specified by the policy issuer.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4
© 2015 Microsoft