Ejemplo n.º 1
0
 public SiteSignInManager(
     SiteUserManager <TUser> userManager,
     IHttpContextAccessor contextAccessor,
     //MultiTenantCookieOptionsResolver tenantResolver,
     IOptions <MultiTenantOptions> multiTenantOptionsAccessor,
     ISiteRepository siteRepository,
     IUserClaimsPrincipalFactory <TUser> claimsFactory,
     IOptions <IdentityOptions> optionsAccessor,
     ILogger <SignInManager <TUser> > logger)
     : base(userManager,
            contextAccessor,
            claimsFactory,
            optionsAccessor,
            logger
            )
 {
     UserManager     = userManager;
     SiteUserManager = userManager;
     this.context    = contextAccessor.HttpContext;
     // this.tenantResolver = tenantResolver;
     log = logger;
     multiTenantOptions = multiTenantOptionsAccessor.Value;
     siteRepo           = siteRepository;
     Options            = optionsAccessor.Value;
 }
Ejemplo n.º 2
0
        public SiteSignInManager(
            SiteUserManager <TUser> siteUserManager,
            IHttpContextAccessor contextAccessor,
            IOptions <MultiTenantOptions> multiTenantOptionsAccessor,
            ISiteQueries siteQueries,
            IUserClaimsPrincipalFactory <TUser> claimsFactory,
            IOptions <IdentityOptions> optionsAccessor,
            ILogger <SignInManager <TUser> > logger)
            : base(siteUserManager,
                   contextAccessor,
                   claimsFactory,
                   optionsAccessor,
                   logger)
        {
            this.siteUserManager = siteUserManager;
            context     = contextAccessor.HttpContext;
            this.logger = logger;

            multiTenantOptions = multiTenantOptionsAccessor.Value;

            if (siteQueries == null)
            {
                throw new ArgumentNullException(nameof(siteQueries));
            }
            queries = siteQueries;

            this.options = optionsAccessor.Value;
        }
 public DefaultAccountLoginRulesProcessor(
     SiteUserManager <SiteUser> userManager,
     ISiteAccountCapabilitiesProvider capabilitiesProvider
     )
 {
     _userManager          = userManager;
     _capabilitiesProvider = capabilitiesProvider;
 }
        public SiteUserClaimsPrincipalFactory(
            ISiteRepository siteRepository,
            SiteUserManager <TUser> userManager,
            SiteRoleManager <TRole> roleManager,
            IOptions <IdentityOptions> optionsAccessor) : base(userManager, roleManager, optionsAccessor)
        {
            if (siteRepository == null)
            {
                throw new ArgumentNullException(nameof(siteRepository));
            }

            siteRepo = siteRepository;
            options  = optionsAccessor.Value;
        }
Ejemplo n.º 5
0
        public SiteUserClaimsPrincipalFactory(
            ISiteRepository siteRepository,
            MultiTenantCookieOptionsResolver tenantResolver,
            SiteUserManager <TUser> userManager,
            SiteRoleManager <TRole> roleManager,
            IOptions <IdentityOptions> optionsAccessor) : base(userManager, roleManager, optionsAccessor)
        {
            if (siteRepository == null)
            {
                throw new ArgumentNullException(nameof(siteRepository));
            }

            siteRepo            = siteRepository;
            this.tenantResolver = tenantResolver;
            options             = optionsAccessor.Options;
        }
        public SiteUserClaimsPrincipalFactory(
            ISiteQueries siteQueries,
            SiteUserManager <TUser> userManager,
            SiteRoleManager <TRole> roleManager,
            IOptions <IdentityOptions> optionsAccessor,
            IEnumerable <ICustomClaimProvider> customClaimProviders
            )
            : base(userManager, roleManager, optionsAccessor)
        {
            if (siteQueries == null)
            {
                throw new ArgumentNullException(nameof(siteQueries));
            }

            queries = siteQueries;
            options = optionsAccessor.Value;
            this.customClaimProviders = customClaimProviders;
        }
Ejemplo n.º 7
0
        public SiteUserClaimsPrincipalFactory(
            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;
            this.customClaimProviders = customClaimProviders;
        }