Sub object_OnAuthenticate (
[Index As Integer,]
ByVal ClientId As Variant,
ByVal HostName As Variant,
ByVal UserName As Variant,
ByVal Password As Variant
)
The OnAuthenticate event occurs when the client has included
authentication credentials with its request. The event handler can call
the Authenticate method to authenticate the client session. If
the client session is not authenticated, the server will send an error
response to the client and close the connection.
In most cases, a client will not provide credentials unless the
server indicates that they are required to access a specific resource.
If you wish to password protect documents in a specific folder,
use the AddPath method to create a virtual path to the folder
and include the httpAccessProtected permission. The server will
automatically require the client to provide credentials when accessing
those documents. To require authentication for a specific resource,
implement an OnCommand event handler and check the value of the
IsAuthenticated property when that resource is requested. If the
property returns False, then use the RequireAuthentication
method to indicate to the client that it must provide authentication
credentials.
If the application has created one or more virtual users using the
AddUser method and/or the LocalUser property has been
set to True, it is not necessary to implement an
OnAuthenticate handler unless you also wish to perform custom
authentication for specific users.