public void Log(IServiceProvider serviceProvider, ILogger logger)
 {
     SettingsLogger.LogSettings(
         "app",
         GetConfig(serviceProvider),
         logger);
 }
 public void Configure(string name, OpenIdConnectOptions options)
 {
     options.ClientId             = _azureOptions.ClientId;
     options.Authority            = $"{_azureOptions.Instance}{_azureOptions.TenantId}";
     options.UseTokenLifetime     = true;
     options.CallbackPath         = _azureOptions.CallbackPath;
     options.RequireHttpsMetadata = false;
     SettingsLogger.WriteOpenIdSettings(options);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new in-memory NFig store.
 /// </summary>
 /// <param name="globalAppName">The name of the global application. If you are using sub apps, this may represent the name of the umbrella "parent" application.</param>
 /// <param name="tier">Tier the application is running on (cannot be the default "Any" value).</param>
 /// <param name="dataCenter">DataCenter the application is running in (cannot be the default "Any" value).</param>
 /// <param name="logger">The logger which events will be sent to.</param>
 /// <param name="encryptor">
 /// Object which will provide encryption/decryption for encrypted settings. Only required if there are encrypted settings in use.
 /// </param>
 /// <param name="additionalDefaultConverters">
 /// Allows you to specify additional (or replacement) default converters for types. Each key/value pair must be in the form of
 /// (typeof(T), <see cref="ISettingConverter{T}"/>).
 /// </param>
 public NFigMemoryStore(
     string globalAppName,
     TTier tier,
     TDataCenter dataCenter,
     SettingsLogger <TSubApp, TTier, TDataCenter> logger = null,
     ISettingEncryptor encryptor = null,
     Dictionary <Type, object> additionalDefaultConverters = null)
     : base(globalAppName, tier, dataCenter, logger, encryptor, additionalDefaultConverters, pollingInterval: 0)
 {
 }
Exemplo n.º 4
0
 public static NFigStore <TSettings, SubApp, Tier, DataCenter> CreateStore <TSettings>(
     string globalAppName  = GLOBAL_APP_1,
     Tier tier             = Tier.Local,
     DataCenter dataCenter = DataCenter.Local,
     SettingsLogger <SubApp, Tier, DataCenter> logger = null,
     ISettingEncryptor encryptor = null,
     Dictionary <Type, object> additionalConverters = null)
     where TSettings : class, INFigSettings <SubApp, Tier, DataCenter>, new()
 {
     return(new NFigMemoryStore <TSettings, SubApp, Tier, DataCenter>(globalAppName, tier, dataCenter, logger, encryptor, additionalConverters));
 }
Exemplo n.º 5
0
 private void LogSettings(IApplicationBuilder app, ILogger logger)
 {
     SettingsLogger.LogSettings(
         "authdb",
         app.ApplicationServices.GetService <IOptions <Configuration.AuthdbSettings> >().Value,
         logger);
     SettingsLogger.LogSettings(
         "KubeCtl",
         app.ApplicationServices.GetService <IOptions <Configuration.KubeCtlSettings> >().Value,
         logger);
     SettingsLogger.LogSettings(
         "TokenGeneration",
         app.ApplicationServices.GetService <IOptions <TokenGenerationSettings> >().Value,
         logger);
     SettingsLogger.LogSettings(
         "DefaultUser",
         app.ApplicationServices.GetService <IOptions <DefaultUserSettings> >().Value,
         logger);
 }