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;
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 4
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;
        }