public CasGoogleId( ILogger <CasGoogleId> logger, CasTokenIssuer tokenIssuer, ICasClaimsBuilder claimsBuilder = null, ICasAuthCodeReceiver authCodeReceiver = null ) : base(logger, tokenIssuer, claimsBuilder, authCodeReceiver) { this.ConfigManager = new ConfigurationManager <OpenIdConnectConfiguration>("https://accounts.google.com/.well-known/openid-configuration", new OpenIdConnectConfigurationRetriever()); }
public CasIdp( ILogger logger, CasTokenIssuer tokenIssuer, ICasClaimsBuilder claimsBuilder = null, ICasAuthCodeReceiver authCodeReceiver = null ) { this.Logger = logger; this.TokenIssuer = tokenIssuer; this.ClaimsBuilder = claimsBuilder; this.AuthCodeReceiver = authCodeReceiver; }
public static async Task AddAllClaims(this ICasClaimsBuilder builder, IEnumerable <Claim> inClaims, List <Claim> outClaims) { try { builder.AddClaims(inClaims, outClaims); } catch (NotImplementedException) { // ignore, it is OK to not be implemented } try { await builder.AddClaimsAsync(inClaims, outClaims); } catch (NotImplementedException) { // ignore, it is OK to not be implemented } }
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."); } }