Exemple #1
0
        /// <summary>
        /// Creates a new instance of <see cref="SecurityStampValidator"/>.
        /// </summary>
        /// <param name="options">Used to access the <see cref="IdentityOptions"/>.</param>
        /// <param name="signInManager">The <see cref="SignInManager "/>.</param>
        /// <param name="clock">The system clock.</param>
        public SecurityStampValidator(IOptions <SecurityStampValidatorOptions> options, ISignInManager signInManager, ISystemClock clock)
        {
            options.CheakArgument();

            SignInManager = signInManager ?? throw new ArgumentNullException(nameof(signInManager));
            Options       = options.Value;
            Clock         = clock;
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory`1" /> class.
 /// </summary>
 /// <param name="userManager">The <see cref="T:Microsoft.AspNetCore.Identity.UserManager`1" /> to retrieve user information from.</param>
 /// <param name="optionsAccessor">The configured <see cref="T:Microsoft.AspNetCore.Identity.IdentityOptions" />.</param>
 public ADreamClaimsPrincipalFactory(UserManagerService userManager, IOptions <ADreamOptions> optionsAccessor)
 {
     userManager.CheakArgument();
     optionsAccessor.CheakArgument();
     if (optionsAccessor.Value != null)
     {
         UserManager = userManager;
         Options     = optionsAccessor.Value;
     }
 }
Exemple #3
0
 public SignInManagerService(UserManagerService userManager, IHttpContextAccessor contextAccessor, IUserClaimsPrincipalFactory <User> claimsFactory, IOptions <ADreamOptions> optionsAccessor, ILogger <SignInManagerService> logger, IAuthenticationSchemeProvider schemes)
 {
     UserManager.CheakArgument();
     contextAccessor.CheakArgument();
     optionsAccessor.CheakArgument();
     schemes.CheakArgument();
     UserManager = userManager;
     Context     = contextAccessor.HttpContext;
     Options     = optionsAccessor?.Value;
     Logger      = logger;
     Schemes     = schemes;
 }