public CasConfig( ILogger <CasConfig> logger, IAccessTokenFetcher accessTokenFetcher, IHttpClientFactory httpClientFactory ) : base(logger, accessTokenFetcher, httpClientFactory) { }
public Config( ILogger <Config> logger, IAccessTokenFetcher accessTokenFetcher, IHttpClientFactory httpClientFactory ) { this.Logger = logger; this.AccessTokenFetcher = accessTokenFetcher; this.HttpClient = httpClientFactory.CreateClient("netbricks"); this.Cache = new ConcurrentDictionary <string, object>(); }
public Config( ILogger <Config> logger, IAccessTokenFetcher accessTokenFetcher = null, IHttpClientFactory httpClientFactory = null, IConfigProvider configProvider = null ) { this.Logger = logger; this.AccessTokenFetcher = accessTokenFetcher; if (httpClientFactory != null) { this.HttpClient = httpClientFactory.CreateClient("netbricks"); } this.Cache = new ConcurrentDictionary <string, object>(); this.ConfigProvider = configProvider ?? new EnvVarConfigProvider(); }
public CasAzureAd( ILogger <CasAzureAd> logger, IConfig config, CasTokenIssuer tokenIssuer, IHttpClientFactory httpClientFactory, IAccessTokenFetcher accessTokenFetcher, ICasClaimsBuilder claimsBuilder = null, ICasAuthCodeReceiver authCodeReceiver = null ) : base(logger, tokenIssuer, claimsBuilder, authCodeReceiver) { this.ConfigManager = new ConfigurationManager <OpenIdConnectConfiguration>($"{CasConfig.AzureAuthority}/.well-known/openid-configuration", new OpenIdConnectConfigurationRetriever()); this.HttpClient = httpClientFactory.CreateClient("cas"); this.AccessTokenFetcher = accessTokenFetcher; this.Config = config as CasConfig; if (this.Config == null) { throw new Exception("CasAzureAd: CasConfig was not found in the IServiceCollection."); } }