This class is used to save the default settings for the app by saving the username and password Author- Riju Vashisht date - 05/21/2013 Please do not change it unless you know what you are doing.
コード例 #1
0
 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;
     }
 }
コード例 #2
0
        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;
            }
        }