Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetToken Method (CardSpacePolicyElement[], SecurityTokenSerializer)

CardSpaceSelector.GetToken Method (CardSpacePolicyElement[], SecurityTokenSerializer)

Generates a security token using the CardSpace system and the specified policy chain and token serializer.

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

static member GetToken : 
        policyChain:CardSpacePolicyElement[] * 
        tokenSerializer:SecurityTokenSerializer -> GenericXmlSecurityToken

Parameters

policyChain
Type: System.IdentityModel.Selectors.CardSpacePolicyElement[]

An array of CardSpacePolicyElement that describes the federated security chain that the client requires a final token to unwind.

tokenSerializer
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.

ExceptionCondition
ArgumentNullException

policyChain is a null reference (Nothing in Visual Basic).

-or-

policyChain is zero length.

-or-

tokenSerializer is a null reference (Nothing in Visual Basic).

.NET Framework

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

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft