Exemple #1
0
 private string Password(string password)
 {
     if (AuthState == AuthStates.NeedPass)
     {
         _userpass = password;
         AuthState = AuthStates.Autorized;
         return("230 User logged in.");
     }
     else
     {
         return("503 Bad sequence of commands.");
     }
 }
Exemple #2
0
        private string User(string username)
        {
            string outValue = "";

            if (string.IsNullOrEmpty(username.Trim()))
            {
                outValue  = "531 Username bad.";
                AuthState = AuthStates.NeedUser;
            }
            else
            {
                _username = username;
                outValue  = "331 Username ok, need password.";
                AuthState = AuthStates.NeedPass;
            }

            return(outValue);
        }
Exemple #3
0
        private void FTP_Init()
        {
            AuthState    = AuthStates.NeedUser;
            _userCommand = "";
            _username    = "";
            _userpass    = "";

            if (fileLog != null)
            {
                try
                {
                    fileLog.Flush();
                    fileLog.Close();
                }
                catch { }

                fileLog = null;
            }
        }
Exemple #4
0
 public SessionInfo()
 {
     ApiKey     = Guid.Empty;
     _authState = AuthStates.NonAuthentiticated;
 }
Exemple #5
0
 public SessionInfo()
 {
     ApiKey = Guid.Empty;
     _authState = AuthStates.NonAuthentiticated;
 }