GetUserToken Callback Function

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

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

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

Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
Header

Declared in Wpxhttpfilt.h.

DLL

Requires W3Filter.dll.

See Also

Callback Functions


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.