แก้ไข

แชร์ผ่าน


CardSpaceSelector.GetToken Method

Definition

Generates a security token using the CardSpace system.

Overloads

GetToken(CardSpacePolicyElement[], SecurityTokenSerializer)

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

GetToken(XmlElement, IEnumerable<XmlElement>, XmlElement, SecurityTokenSerializer)

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

GetToken(CardSpacePolicyElement[], SecurityTokenSerializer)

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

public:
 static System::IdentityModel::Tokens::GenericXmlSecurityToken ^ GetToken(cli::array <System::IdentityModel::Selectors::CardSpacePolicyElement ^> ^ policyChain, System::IdentityModel::Selectors::SecurityTokenSerializer ^ tokenSerializer);
public static System.IdentityModel.Tokens.GenericXmlSecurityToken GetToken (System.IdentityModel.Selectors.CardSpacePolicyElement[] policyChain, System.IdentityModel.Selectors.SecurityTokenSerializer tokenSerializer);
static member GetToken : System.IdentityModel.Selectors.CardSpacePolicyElement[] * System.IdentityModel.Selectors.SecurityTokenSerializer -> System.IdentityModel.Tokens.GenericXmlSecurityToken
Public Shared Function GetToken (policyChain As CardSpacePolicyElement(), tokenSerializer As SecurityTokenSerializer) As GenericXmlSecurityToken

Parameters

policyChain
CardSpacePolicyElement[]

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

tokenSerializer
SecurityTokenSerializer

A SecurityTokenSerializer that can read a KeyInfo clause.

Returns

A GenericXmlSecurityToken that represents the generated security token.

Exceptions

policyChain is null.

-or-

policyChain is zero length.

-or-

tokenSerializer is null.

Applies to

GetToken(XmlElement, IEnumerable<XmlElement>, XmlElement, SecurityTokenSerializer)

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

public:
 static System::IdentityModel::Tokens::GenericXmlSecurityToken ^ GetToken(System::Xml::XmlElement ^ endpoint, System::Collections::Generic::IEnumerable<System::Xml::XmlElement ^> ^ policy, System::Xml::XmlElement ^ requiredRemoteTokenIssuer, System::IdentityModel::Selectors::SecurityTokenSerializer ^ tokenSerializer);
public static System.IdentityModel.Tokens.GenericXmlSecurityToken GetToken (System.Xml.XmlElement endpoint, System.Collections.Generic.IEnumerable<System.Xml.XmlElement> policy, System.Xml.XmlElement requiredRemoteTokenIssuer, System.IdentityModel.Selectors.SecurityTokenSerializer tokenSerializer);
static member GetToken : System.Xml.XmlElement * seq<System.Xml.XmlElement> * System.Xml.XmlElement * System.IdentityModel.Selectors.SecurityTokenSerializer -> System.IdentityModel.Tokens.GenericXmlSecurityToken
Public Shared Function GetToken (endpoint As XmlElement, policy As IEnumerable(Of XmlElement), requiredRemoteTokenIssuer As XmlElement, tokenSerializer As SecurityTokenSerializer) As GenericXmlSecurityToken

Parameters

endpoint
XmlElement

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

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

requiredRemoteTokenIssuer
XmlElement

An XmlElement that represents the issuer of the token.

tokenSerializer
SecurityTokenSerializer

A SecurityTokenSerializer that can read a KeyInfo clause.

Returns

A GenericXmlSecurityToken that represents the generated security token.

Exceptions

endpoint is null.

-or-

policy is null.

-or-

tokenSerializer is null.

Remarks

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

Applies to