public OpenStack(String user,String pass) { this._Username=user; this._Password = pass; if (!isSaved) { _Settings = new MySettings(); _Settings.Username = user; _Settings.Password = new Encrypt().Encrypting(pass); _Settings.Save(); isSaved = true; } }
public string Authenticate() { _Settings = MySettings.Load();//geting password and username from my settings file if (!(this._Username == _Settings.Username && new Encrypt().Encrypting(this._Password) == _Settings.Password)) { return "Please check your username and password"; } else { SwiftClient SC = new SwiftClient(); _Headers = new Dictionary<string, string>(); _Query = new Dictionary<string, string>(); // SC.GetAuth("localhost","jdoe","a86850",headers,query,false);//requires host.... Console.Write("Áccess granted"); // settings.Save(); _Token = "true"; return _Token; } }