Esempio n. 1
0
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="config">Конфигурация.</param>
        /// <param name="externals">Внешнее.</param>
        public ModAuthBaseContext(ModAuthBaseConfig config, ModAuthBaseExternals externals)
        {
            Config = config;

            Resources = new ModAuthBaseResources(
                externals.ResourceErrorsLocalizer,
                externals.ResourceSuccessesLocalizer
                );

            var jwtService = new CoreBaseAuthTypeJwtService(Config.Settings.Types.Jwt);

            Service = new ModAuthBaseService(jwtService);

            Jobs = new ModAuthBaseJobs(
                externals.CoreBaseResourceErrors,
                Resources.Successes,
                Resources.Errors,
                Service
                );
        }
Esempio n. 2
0
 /// <summary>
 /// Инициализировать конфигурацию.
 /// </summary>
 /// <param name="environment">Окружение.</param>
 public void InitConfig(CoreBaseEnvironment environment)
 {
     Config = new ModAuthBaseConfig(environment);
 }