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."); } }
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); }
private void FTP_Init() { AuthState = AuthStates.NeedUser; _userCommand = ""; _username = ""; _userpass = ""; if (fileLog != null) { try { fileLog.Flush(); fileLog.Close(); } catch { } fileLog = null; } }
public SessionInfo() { ApiKey = Guid.Empty; _authState = AuthStates.NonAuthentiticated; }