Пример #1
0
        private static CloudBornWebConfiguration CreateConfiguration(IConfiguration configuration)
        {
            ServiceEnvironmentSettings serviceEnvironmentSettings = configuration.GetSection("ServiceEnvironment").Get <ServiceEnvironmentSettings>();
            var environmentSettings = EnvironmentSettingsLoader.Load(serviceEnvironmentSettings.EnvironmentSettingsResourceName);

            TokenValidationSettings tokenValidationSettings = configuration.GetSection("TokenValidation").Get <TokenValidationSettings>();

            var authorizedResources = configuration.GetSection("AuthorizedResources").Get <AuthorizedResources>();

            return(new CloudBornWebConfiguration(serviceEnvironmentSettings, environmentSettings, tokenValidationSettings, authorizedResources));
        }
Пример #2
0
 public CloudBornWebConfiguration(
     ServiceEnvironmentSettings serviceEnvironmentSettings,
     EnvironmentSettings environmentSettings,
     TokenValidationSettings tokenValidationSettings,
     AuthorizedResources authorizedResources)
 {
     this.ServiceEnvironmentSettings = serviceEnvironmentSettings;
     this.EnvironmentSettings        = environmentSettings;
     this.TokenValidationSettings    = tokenValidationSettings;
     this.AuthorizedResources        = authorizedResources;
 }