Exemple #1
0
 public TwoFactorManager(ITwoFactorDbContext twoFactorDb, IPrincipalUser principal, ISmsSender?smsSender, IMailSender?mailSender)
 {
     if (smsSender == null && mailSender == null)
     {
         throw new ArgumentNullException(null, $"At least to configure one of {smsSender} or {mailSender}");
     }
     _twoFactorDb = twoFactorDb;
     _me          = principal;
     _smsSender   = smsSender;
     _mailSender  = mailSender;
 }
Exemple #2
0
 public TwoFactorManager(ITwoFactorDbContext twoFactorDb, IPrincipalUser principal, IMailSender mailSender)
     : this(twoFactorDb, principal, null, mailSender)
 {
 }
Exemple #3
0
 public TwoFactorManager(ITwoFactorDbContext twoFactorDb, IPrincipalUser principal, ISmsSender smsSender)
     : this(twoFactorDb, principal, smsSender, null)
 {
 }