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.

C#
public static System.IdentityModel.Tokens.GenericXmlSecurityToken GetToken(System.IdentityModel.Selectors.CardSpacePolicyElement[] policyChain, System.IdentityModel.Selectors.SecurityTokenSerializer tokenSerializer);

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

.NET Framework 4.8.1 a ďalšie verzie
Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

C#
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);

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

.NET Framework 4.8.1 a ďalšie verzie
Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1