Internet Direct (Indy)
Home
PreviousUpNext
TIdFTP.Login Method

Authenticates a client connection to the FTP server.

Pascal
procedure Login;

Login is a procedure used to perform FTP protocol exchanges needed to provide authentication for the FTP client connection to the remote FTP server. 

TIdFTP includes support for Tranport Layer Security (or TLS) as indicated in the UseTLS property. When UseTLS contains a value that indicates explicit use of TLS/SSL, Login will perform the FTP commands required to handle the TLS negotiation including the FTP AUTH command for the values indicated in the the TLS_AUTH_NAMES array. 

Login provides support for proxied connections to the FTP server through properties and methods in ProxySettings. Set the value in ProxySettings.ProxyType to the TIdFtpProxyType value desired for the connection prior to calling Connect or Login. Please note that proxied connections using the TIdFtpProxyType value fpcmHttpProxyWithFtp are not implemented at this time. 

Login sends the OPEN (for certain proxy settings), USER, and PASS commands as required to perform authentication using the values in Username, Password, and the corresponding property values in ProxySettings. If the FTP server supports the OTP (One-Time-Password) system, the appropriate hashed values are calculated using the OTP challenge and the Password property. 

Login stores the values in LastCmdResult in the LoginMsg property, and triggers the OnBannerAfterLogin eent handler using the formatted reply in LoginMsg

Login will attempt to perform optional feature negotiation for servers supporting the FTP FEAT command. The response from the FTP FEAT command is stored in the Capabilities property, and made available for use in other FTP client methods. When UsingExtDataPort is True, Login checks that the FTP EPRT and EPSV extension commands are available in the Capabilities property. 

When ClientInfo contains non-empty values, the FTP CLNT extension command is used to send the identification values when the remote server include the CLNT command in its Capabilties. 

Login updates the value in CanUseMLS to indicate if the MLST and MLSD listing formats can be used and are supported in the server Capabilties. 

Login updates the value in LangsSupported to reflect the facts associated with the FTP feature extracted from the Capabilities property. 

Login sends the trandfer type for the authenticated connection using the value in the TransferType property. 

Login is called by the Connect method when AutoLogin contains True, and can be called in an application after using the ReInitialize method. 

Use the Account method to provide additional information about a client connection on some FTP server implementations.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.