private static RedmineManager CreateRedmineManager(IssueTrackerConfiguration config)
        {
            string host   = config.GetValue(CSRedmineExtension.HOST_KEY);
            string apikey = config.GetValue(CSRedmineExtension.APIKEY_KEY);

            if (apikey == null || apikey == String.Empty)
            {
                string user     = config.GetValue(CSRedmineExtension.USER_KEY); //  config.User;
                string password = CryptoServices.GetDecryptedPassword(config.GetValue(CSRedmineExtension.PASSWORD_KEY));

                return(new RedmineManager(host, user, password));
            }

            return(new RedmineManager(host, apikey));
        }
Example #2
0
        public string GetDecryptedPassword()
        {
            if (Config == null)
            {
                throw new ApplicationException("The configuration has not yet been initialized!");
            }

            if (string.IsNullOrEmpty(Password))
            {
                throw new ApplicationException("Password value can not be empty!");
            }

            var decryptedPassword = CryptoServices.GetDecryptedPassword(Password);

            return(decryptedPassword);
        }
Example #3
0
 private string GetDecryptedPassword(string encryptedPassword)
 {
     return(CryptoServices.GetDecryptedPassword(encryptedPassword));
 }