Skip to content

Latest commit

 

History

History
129 lines (99 loc) · 4.9 KB

nf-webservices-wsrequestsecuritytoken.md

File metadata and controls

129 lines (99 loc) · 4.9 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:webservices.WsRequestSecurityToken
WsRequestSecurityToken function (webservices.h)
Get a security token from a security token service (STS) that acts as the token issuer in a federation scenario.
WsRequestSecurityToken
WsRequestSecurityToken function [Web Services for Windows]
webservices/WsRequestSecurityToken
wsw.wsrequestsecuritytoken
wsw\wsrequestsecuritytoken.htm
wsw
ee754a7d-73a9-49ae-afc7-b443fbbe0cce
12/05/2018
WsRequestSecurityToken, WsRequestSecurityToken function [Web Services for Windows], webservices/WsRequestSecurityToken, wsw.wsrequestsecuritytoken
webservices.h
Windows
Windows 7 [desktop apps \| UWP apps]
Windows Server 2008 R2 [desktop apps \| UWP apps]
WebServices.lib
WebServices.dll
Windows
19H1
WsRequestSecurityToken
webservices/WsRequestSecurityToken
c++
APIRef
kbSyntax
DllExport
WebServices.dll
WsRequestSecurityToken

WsRequestSecurityToken function

-description

Get a security token from a security token service (STS) that acts as the token issuer in a federation scenario. This function is used on the client side, and performs the WS-Trust based negotiation steps with the STS until the security token is obtained or the negotiation process fails.

-parameters

-param channel [in]

The channel on which the negotiation to obtain the security token should take place.

The supplied channel should have been created with the appropriate WS_SECURITY_DESCRIPTION to meet the security requirements of the issuer, and then opened to the WS_ENDPOINT_ADDRESS of the issuer. The caller is also responsible for closing and freeing the channel after the completion of this function.

Thus, the channel must be in state WS_CHANNEL_STATE_OPEN when this function is called. After a successful completion of this function, the channel will be in state WS_CHANNEL_STATE_OPEN. After a failed completion, it will either be in state WS_CHANNEL_STATE_OPEN or state WS_CHANNEL_STATE_FAULTED.

-param properties

An optional group of settings to be used in the negotiation process with the issuer.

-param propertyCount [in]

The number of items in the properties array.

-param token

The XML security token obtained. This is set upon successful completion of the function call, and is unmodified if any failure occurs during the execution of the function.

The returned security token may be used with WS_XML_TOKEN_MESSAGE_SECURITY_BINDING if it is to be presented to a service. The token must be freed using WsFreeSecurityToken when it is no longer needed.

-param asyncContext [in, optional]

Information on how to invoke the function asynchronously, or NULL if invoking synchronously.

-param error [in, optional]

Specifies where additional error information should be stored if the function fails.

-returns

This function can return one of these values.

Return code Description
WS_S_ASYNC
The asynchronous operation is still pending.

-remarks

Windows 7 and Windows Server 2008 R2: WWSAPI only supports Ws-Trust and Ws-SecureConversation as defined by Lightweight Web Services Security Profile (LWSSP). For details regarding Microsoft's implementation please see the MESSAGE Syntax section of LWSSP.