Ejemplo n.º 1
0
 public HomeController(
     IOidcHybridFlowHelper oidcHybridFlowHelper,
     IHttpClientFactory httpClientFactory,
     IdentityServer4.IdentityServerTools idserver,
     SiteContext currentSite,
     IEmailSenderResolver emailSenderResolver,
     ViewRenderer viewRenderer,
     GoogleAnalyticsHelper analyticsHelper
     )
 {
     _oidcHybridFlowHelper = oidcHybridFlowHelper;
     _currentSite          = currentSite;
     _emailSenderResolver  = emailSenderResolver;
     _viewRenderer         = viewRenderer;
     _analyticsHelper      = analyticsHelper;
     _httpClientFactory    = httpClientFactory;
     _idserver             = idserver;
 }
Ejemplo n.º 2
0
 public SiteOpenIdConnectOptions(
     IOidcHybridFlowHelper oidcHybridFlowHelper,
     IOptionsFactory <OpenIdConnectOptions> factory,
     IEnumerable <IOptionsChangeTokenSource <OpenIdConnectOptions> > sources,
     IOptionsMonitorCache <OpenIdConnectOptions> cache,
     IOptions <MultiTenantOptions> multiTenantOptionsAccessor,
     IHttpContextAccessor httpContextAccessor,
     IHostingEnvironment environment,
     ILogger <SiteOpenIdConnectOptions> logger
     ) : base(factory, sources, cache)
 {
     _oidcHybridFlowHelper = oidcHybridFlowHelper;
     _multiTenantOptions   = multiTenantOptionsAccessor.Value;
     _httpContextAccessor  = httpContextAccessor;
     _factory     = factory;
     _cache       = cache;
     _environment = environment;
     _log         = logger;
 }
        public SiteUserClaimsPrincipalFactory(
            IOidcHybridFlowHelper oidcHybridFlowHelper,
            ISiteQueries siteQueries,
            SiteUserManager <TUser> userManager,
            SiteRoleManager <TRole> roleManager,
            IOptions <IdentityOptions> optionsAccessor,
            IEnumerable <ICustomClaimProvider> customClaimProviders // an extension point if you need to be able to add custom claims you can inject one or more of these
            )
            : base(userManager, roleManager, optionsAccessor)
        {
            if (siteQueries == null)
            {
                throw new ArgumentNullException(nameof(siteQueries));
            }

            _queries = siteQueries;
            _options = optionsAccessor.Value;
            _customClaimProviders = customClaimProviders;
            _oidcHybridFlowHelper = oidcHybridFlowHelper;
        }