示例#1
0
 public TwoFactorAuthPolicyCommandHandler(ITwoFactorAuthenticationPolicy policy)
 {
     if (policy == null)
     {
         throw new ArgumentNullException("policy");
     }
     this.policy = policy;
 }
示例#2
0
        public static void ConfigureTwoFactorAuthenticationPolicy <TAccount>(this UserAccountService <TAccount> svc, ITwoFactorAuthenticationPolicy policy)
            where TAccount : UserAccount
        {
            if (svc == null)
            {
                throw new ArgumentNullException("account");
            }

            svc.AddCommandHandler(new TwoFactorAuthPolicyCommandHandler(policy));
        }
 public static void ConfigureTwoFactorAuthenticationPolicy <TAccount>(this UserAccountService <TAccount> svc, ITwoFactorAuthenticationPolicy policy)
     where TAccount : UserAccount
 {
     svc.AddCommandHandler(new TwoFactorAuthPolicyCommandHandler(policy));
 }