Internet Direct (Indy) Version 9.0.1 Beta
|
property UserType: TIdFTPUserType;
UserType will be given the value utAnonymousUser when AllowAnonymousLogin is True, and AnonymousAccounts contains the account identitity provided as a parameter to the command event handler. Username is given the value in the parameter to the command event handler.
If AllowAnonymousLogin is False or the account identity is not present in AnonymousAccounts, UserType is assigned the value utNormalUser and Username is given the contents of the parameter for the FTP USER command.
UserType will contain the value utNone when an account identity is not provided.
UserType is subsequently used when the FTP PASS command verb is received from the client connection, and the account must be authorized using the credentials provided for the user account. UserType will control the authorization mechanism used for the threaded client connection.
When UserType contains the value utAnonymousUser, the server implementation will require that the password for an anonymous account contain a valid email address when TIdFTPServer.AnonymousPassStrictCheck is True. Otherwise the anonymous account must provide a non-blank password containing any value. When these condition are met, Authenticated will contain True and the parameter value for the command event handler is assigned to the Password property. If either condition is not met, UserType will revert to the value utNone and Authenticated will contain False.
When UserType contains the value utNormalUser, the server implementation will authenticate using the account information in TIdFTPServer.UserAccounts when assigned. The UserAccounts collection is used to perform TIdUserAccounts.AuthenticateUser for the account identity and credentials specified in the Username and Password properties. Authenticated will indicate the results of the authorization process.
Use TIdFTPServer.OnUserLogin to perform account authentication when TIdAccount object instance are not used in the server implementation. Use TIdFTPServer.OnAfterUserLogin to perform additional logging or to extend the authorization process for the threaded client connection.
The default value for UserType is utNone, as assigned in the Create constructor.