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 );
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.