private ISecureDataFormat <AuthenticationTicket> GetTicketDataFormat(MultiTenantCookieOptionsResolver tenantResolver)
        {
            var dataProtector = dataProtectionProvider.CreateProtector(
                typeof(CookieAuthenticationMiddleware).FullName, tenantResolver.ResolveAuthScheme(Options.AuthenticationScheme), "v2");

            return(new TicketDataFormat(dataProtector));
        }
コード例 #2
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;
 }
コード例 #3
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.Value;
        }