The SetADAuthenticatedUser callback function is used by Web filters to set the authenticated Windows user. This enables associating information about an authenticated user with the current request.
The SetADAuthenticatedUser callback function is declared as:
BOOL WINAPI * SetADAuthenticatedUser( __in struct _HTTP_FILTER_CONTEXT* pfc, __in LPSTR lpszUserName , __in LPSTR lpszPassword , __in HANDLE hToken );
Pointer to the HTTP_FILTER_CONTEXT data structure that is associated with the current, active HTTP session. Pass the filter context in this parameter.
Pointer to a null-terminated string containing the user name.
Pointer to a null-terminated string containing the user password.
Token handle.
This callback function returns TRUE if the call is successful; otherwise, it returns FALSE. To obtain extended error information, call GetLastError.
The user token is received using the Security Support Provider Interface (SSPI) layer.
If there is a token, there is no need to pass the password. However, if the token field is NULL, you should provide the password. The user name must be provided if there is a token or if the token field is NULL.
After you provide the token handle to the function, you should close the token handle to prevent handle leaks.
Web filters call the SetADAuthenticatedUser function through a pointer that is a member of the WPX_FILTER_AUTHENT_EX structure. A pointer to this structure is passed in each call to the HttpFilterProc entry-point function when the Web proxy sends an SF_NOTIFY_AUTHENTICATION notification to the Web filters that are registered to receive this notification just before Forefront TMG authenticates a client. If the fAuthIsRequired member of the WPX_FILTER_AUTHENT_EX structure is set to FALSE, the call to SetADAuthenticatedUser succeeds, but the user specified is not set as an authenticated user.
Server | Requires Windows Server 2008. |
---|---|
Version | Requires Forefront Threat Management Gateway (TMG). |
Header |
Declared in Wpxhttpfilt.h. |
DLL |
Requires W3Filter.dll. |
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.