This documentation is archived and is not being maintained.
CardSpaceSelector::GetToken Method (array<CardSpacePolicyElement>, SecurityTokenSerializer)
Visual Studio 2010
Generates a security token using the system and the specified policy chain and token serializer.
Assembly: System.IdentityModel.Selectors (in System.IdentityModel.Selectors.dll)
public: static GenericXmlSecurityToken^ GetToken( array<CardSpacePolicyElement^>^ policyChain, SecurityTokenSerializer^ tokenSerializer )
Parameters
- policyChain
- Type: array<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::GenericXmlSecurityTokenA GenericXmlSecurityToken that represents the generated security token.
| Exception | Condition |
|---|---|
| ArgumentNullException | policyChain is nullptr. -or- policyChain is zero length. -or- tokenSerializer is nullptr. |
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: