Back to product page
- Introduction
- License agreement
- Getting Started
- Enumerations
- Objects
- How to get support?
- Technical information
- Fast notifications interface
- Error list
UserAuthenticate callback method
Called when user wants to authenticate.
Syntax
- Basic
object.UserAuthenticate (Owner, User, AuthType, Action)
The UserAuthenticate(object,Owner,User,AuthType,Action) syntax has these parts:
The UserAuthenticate(object,Owner,User,AuthType,Action) syntax has these parts:
object | An expression evaluating to an object of type IwodWebNotify |
Owner | An expression evaluating to an object of type wodWebServer |
User | WebUser object. Reference to user that called CGI script. |
AuthType | WebAuthenticationTypes object. You can read here type of authentication used by the client. |
Action | WebActions enumeration. You should set this value to Allow if you want to accept user's credentials, or Deny if you don't accept them. |
Remarks
NOTE: This method is called only if you implemented IwodWebNotify interface in your application, and wodWeb1.Notification property has received reference to instance of your implementation.UserAuthenticate notification method is called when user tries to authenticate with the server (no matter if you require it or not). You should check appropriate properties for the user (such as Login, Password, Certificate) and then decide if you will accept user's credentials - by setting Action = Allow, or deny access by setting Action = Deny.
Typically you will do something like this to authenticate user (code sample in VB):
Private Sub IwodWebNotify_UserAuthenticate(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, ByVal AuthType As WODWEBSERVERCOMLib.WebAuthenticationTypes, Action As WODWEBSERVERCOMLib.WebActions)
Dim c As Certificate
Select Case AuthType
Case AuthCertificate
Set c = User.Certificate
If c.PublicKeyOpenSSH = "something you have in database" Then
Action = Allow
Else
Action = Deny
End If
Case AuthBasic
If User.Login = "something" And User.Password = "something" Then
Action = Allow
Else
Action = Deny
End If
Case AuthNTLM
If User.Login = "something" And User.TestNTLMResponse("something") Then
Action = Allow
Else
Action = Deny
End If
End Select
End Sub