public AutoLoginSettings(ISettingsProvider settingsProvider)
 {
     LoginUrl = settingsProvider.GetAppSetting("LoginUrl");
     UsernameElementIdentifier = settingsProvider.GetAppSetting("UsernameElementIdentifier");
     PasswordElementIdentifier = settingsProvider.GetAppSetting("PasswordElementIdentifier");
     LoginElementIdentifier    = settingsProvider.GetAppSetting("LoginElementIdentifier");
     LogoutUrl = settingsProvider.GetAppSetting("LogoutUrl");
 }
Exemple #2
0
        public Account Login(string userName, string password)
        {
            var cipher = _encryptionService.Encrypt(password, _settingsProvider.GetAppSetting(GlobalModule.SettingKey),
                                                    _settingsProvider.GetAppSetting(GlobalModule.SettingVector));
            var account = _dataService.Login(userName, cipher);

            return(account);
        }
Exemple #3
0
        public GoodController(ILogger logger, ISettingsProvider settingsProvider, IScpUnitOfWork unitOfWork, IPasswordHashProvidcer passwordHashProvidcer, IEncryptionProvider encryptionProvider, IRandomNumberGenerator randomNumberGenerator)
        {
            _logger                = logger;
            _settingsProvider      = settingsProvider;
            _unitOfWork            = unitOfWork;
            _passwordHashProvidcer = passwordHashProvidcer;
            _encryptionProvider    = encryptionProvider;
            _randomNumberGenerator = randomNumberGenerator;

            _key    = _settingsProvider.GetAppSetting(ConfigurationKeys.Key);
            _vector = _settingsProvider.GetAppSetting(ConfigurationKeys.Vector);
            _salt   = _settingsProvider.GetAppSetting(ConfigurationKeys.Salt);
        }
Exemple #4
0
 public ApiHelper(ISettingsProvider settingsProvider)
 {
     _settingsProvider = settingsProvider;
     _baseUrl          = _settingsProvider.GetAppSetting(GlobalModule.SettingApiUrl);
 }
        public AzureEventBus CreateEventBus()
        {
            var appQueueConnection = _appSettings.GetAppSetting("EventBus.ConnectionString");
            var appQueue           = _appSettings.GetAppSetting("EventBus.QueueName");

            return(new AzureEventBus(appQueueConnection, appQueue));
        }