示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="accountRepository"></param>
 /// <param name="roleRepository"></param>
 /// <param name="securityOptionsAccessor"></param>
 public ClaimsPrincipalService(IAccountRepository <TAccount> accountRepository, //IRoleRepository roleRepository,
                               IOptions <ClaimsOptions> securityOptionsAccessor)
 {
     _accountRepository = accountRepository;
     //_roleRepository = roleRepository;
     _options = securityOptionsAccessor?.Value;
 }
示例#2
0
 /// <summary>
 /// Constructs an instance of <see cref="CookieSecurityStampValidator{TAccount}"/> .
 /// </summary>
 /// <param name="claimsOptionsAccessor"></param>
 /// <param name="accountRepository"></param>
 /// <param name="claimsPrincipalService"></param>
 /// <param name="cookieOptionsAccessor"></param>
 public CookieSecurityStampValidator(IOptions <ClaimsOptions> claimsOptionsAccessor,
                                     IOptions <CookieAuthOptions> cookieOptionsAccessor,
                                     IAccountRepository <TAccount> accountRepository,
                                     IClaimsPrincipalService <TAccount> claimsPrincipalService)
 {
     _accountRepository      = accountRepository;
     _claimsOptions          = claimsOptionsAccessor.Value;
     _claimsPrincipalService = claimsPrincipalService;
     _cookieOptions          = cookieOptionsAccessor.Value;
 }