CHttpServer::OnAuthenticate Method  
 
virtual void OnAuthenticate(
  UINT nClientId,  
  LPCTSTR lpszHostName,  
  LPCTSTR lpszUserName,  
  LPCTSTR lpszPassword  
);

A virtual method that is invoked after the client has successfully downloaded a file from the server.

Parameters

nClientId
An unsigned integer which uniquely identifies the client session.
lpszHostName
A pointer to a string that specifies the host name that the client used to establish the connection.
lpszUserName
A pointer to a string that specifies the user name provided by the client.
lpszPassword
A pointer to a string that specifies the cleartext user password provided by the client.

Return Value

None.

Remarks

The OnAuthenticate event handler is invoked when the client has provided authentication credentials as part of the request for a document or other resource. To implement an event handler, the application should create a class derived from the CHttpServer class, and then override this method.

The event handler can call the AuthenticateClient method to authenticate the client session. If the event handler does not authenticate the client, the server will perform its default authentication. To reject the credentials provided by the client, use the SendErrorResponse method with a result code of 401.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: cshtsv11.lib
Unicode: Implemented as Unicode and ANSI versions

See Also

OnCommand, OnConnect