GetUserToken callback function
Applies to: desktop apps only
The GetUserToken callback function is used to get an impersonation token of the authenticated user.
The GetUserToken callback function is declared as:
Syntax
BOOL WINAPI GetUserToken(
_In_ struct _HTTP_FILTER_CONTEXT *pfc,
_Out_ HANDLE *phToken
);
Parameters
pfc [in]
Pointer to the HTTP_FILTER_CONTEXT data structure that is associated with the current, active HTTP session. Pass the filter context in this parameter.phToken [out]
Pointer to a variable that on return receives the token handle.
Return value
This callback function returns TRUE if the call is successful; otherwise, it returns FALSE. To obtain extended error information, call GetLastError.
Remarks
When you invoke GetUserToken you must call the CloseHandle function to prevent handle leaks.
When the Web listener receiving client requests is configured to use the OWA Forms-Based authentication scheme, impersonation tokens are not used, and this function always retrieves a token with a value of 0.
Requirements
Minimum supported client |
None supported |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) |
Version |
Forefront Threat Management Gateway (TMG) 2010 |
Header |
Wpxhttpfilt.h |
See also
Build date: 7/12/2010