Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Windows CardSpace
 GetToken
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
GetToken

Gets a security token from the CardSpace system.

HRESULT
__stdcall GetToken(
        __in DWORD  cPolicyChain,
        __in_ecount( cPolicyChain ) PPOLICY_ELEMENT pPolicyChain,
        __deref_out PGENERIC_XML_TOKEN* securityToken,
        __deref_out PINFORMATIONCARD_CRYPTO_HANDLE* phProofTokenCrypto );

Parameters

Parameter Description

cPolicyChain

The number of PolicyChain elements in the array pointed to by pPolicyChain.

pPolicyChain

Pointer to an array of POLICY_ELEMENT, each of which contains the following:

  • targetEndpointAddress: The end point of the recipient.

  • issuerEndpointAddress: The token issuer accepted by the client.

  • issuedTokenParameters: The policy associated with the token.

  • privacyNoticeLink: Link to a privacy notice.

  • privacyNoticeVersion: The version of the privacy notice.

  • useManagedPresentation: Determines whether a managed presentation is to be used.

The addresses should be valid WS-Addressing Endpoint references in XML.

securityToken

Pointer to the security token that is returned.

When you have finished using the token, call FreeToken to free the token.

phProofTokenCrypto

Handle to the proof token, which can be later used for proof of possession.

This handle is an INFORMATIONCARD_CRYPTO_HANDLE of type Asymmetric or Symmetric. If the handle type is Asymmetric, it can be passed to the following functions:

Encrypt

Decrypt

SignHash

VerifyHash

If the handle type is Symmetric, it can be passed to the following functions:

GenerateDerivedKey

GetCryptoTransform

GetKeyedHash

When you have finished using this handle, close it using the CloseCryptoHandle function.

HRESULT

Windows Vista

Header: Declared in infocard.h.

Library: Use infocardapi.lib.

Reference

FreeToken

Concepts

HRESULTS Returned

Footer image

Send comments about this topic to Microsoft.

Copyright © 2007 by Microsoft Corporation. All rights reserved.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker