public void LoadConfig(IConfiguration configuration)
        {
            var encryptedString = configuration["AppConfig:DataBase:ConnectionString"];
            var helpers         = new HelperLib();

            Config.DataBase.ConnectionString = helpers.DecryptString(encryptedString);

            Config.Logger.DateFormat = configuration["AppConfig:Logger:DateFormat"];
            Config.Logger.FileName   = configuration["AppConfig:Logger:FileName"];
            Config.JWT.Audience      = configuration["AppConfig:JWT:Audience"];
            Config.JWT.Issuer        = configuration["AppConfig:JWT:Issuer"];
            Config.JWT.Key           = configuration["AppConfig:JWT:Key"];
            Config.JWT.DaysValid     = Convert.ToInt32(configuration["AppConfig:JWT:DaysValid"]);
        }
Exemple #2
0
        public IActionResult DecryptString([FromQuery] string cipherText)
        {
            var result = helperLib.DecryptString(cipherText);

            return(webAPIHelper.CreateResponse(result));
        }