Back to product page

LoginCertificate notification


Called when user wants to authenticate to the server with public key.

Syntax

  • Basic
object.LoginCertificate Owner, User, ErrorText, Certificate, Action
The LoginCertificate(object,Owner,User,ErrorText,Certificate,Action) syntax has these parts:
objectAn expression evaluating to an object of type wodFTPDNotify.
OwnerA wodFTPDCom object. Reference to wodFTPServer instance that called this notification method.
UserA FtpUser object. Reference to user who provided the certificate.
ErrorTextA String value. Text description of certificate validation errors - one per line.
CertificateAn ICertificate object. Reference to ICertificate object containing user's certificate.
ActionA FtpActions enumeration, as described in settings. When set to Deny/SilentDeny, wodFTPServer denies this action.

Remarks

NOTE: This method is called only if you implemented IwodFTPDNotify interface in your application, and wodFTPD.Notification property has received reference to instance of your implementation.

LoginCertificate notification method is called when the client supplies his client certificate and tries to authenticate using it. At this point, you should decide if you will accept the certificate. If so - set Action = Allow. If you don't want to allow access, set Action = Deny.

It is possible that at this stage user's Login information is empty. This is due to fact that SSL is established and the certificate is provided before any data flow between the client and the server - thus before he managed to send his login information to you.

To get more information about the certificate, feel free to check Certificate's properties and methods - they are provided through wodCertificate object.

If supplied certificate contains validation errors, they will be provided through ErrorText argument - line by line per error.

The settings for Action are
Constant Value Description
Deny0 Deny execution of the action.
Allow 1 Allow to execute action.
SilentDeny2 Silently deny execution of the action.
SilentAllow 3 Silently allow to execute action.

Platforms

Windows