コード例 #1
0
 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());
 }
コード例 #2
0
ファイル: CasIdp.cs プロジェクト: plasne/openid-connect
 public CasIdp(
     ILogger logger,
     CasTokenIssuer tokenIssuer,
     ICasClaimsBuilder claimsBuilder       = null,
     ICasAuthCodeReceiver authCodeReceiver = null
     )
 {
     this.Logger           = logger;
     this.TokenIssuer      = tokenIssuer;
     this.ClaimsBuilder    = claimsBuilder;
     this.AuthCodeReceiver = authCodeReceiver;
 }
コード例 #3
0
 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
     }
 }
コード例 #4
0
 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.");
     }
 }