The OnAuthenticate event handler is invoked when the client
has requested authentication by sending the USER and PASS command to
the server. To implement an event handler, the application should
create a class derived from the CFtpServer class, and then
override this method.
The event handler can call the AuthenticateClient method to
authenticate the client session. To reject an authentication attempt
because of an invalid user name or password, the handler should call
the SendResponse method and specify a result code of 430.
If the client session is not authenticated, the server will perform
its default authentication process. If the FTP_SERVER_ANONYMOUS
configuration option has been specified, and the client has logged in
as an anonymous user, the session will be authenticated as a restricted
user. If the FTP_SERVER_LOCALUSER configuration option has been
specified, the user name and password is checked against the local
user database. If the credentials are valid, the session will be
authenticated as a regular user. If neither the FTP_SERVER_ANONYMOUS
or FTP_SERVER_LOCALUSER options were specified, the default action is
to reject all authentication attempts.