public TotpManager(ITotpGenerator totpGenerator, string secretKey, int totpTokenLifetimeInSeconds, ITotpTokenRepository totpTokenRepository) { _totpGenerator = totpGenerator ?? throw new ArgumentNullException(nameof(totpGenerator)); _secretKey = secretKey ?? throw new ArgumentNullException(nameof(secretKey)); _totpTokenLifetimeInSeconds = totpTokenLifetimeInSeconds; _totpTokenRepository = totpTokenRepository; }
public AccountController(UserManager <User> userManager, SignInManager <User> signInManager, ILogger <AccountController> logger, IEmailService emailService, ApplicationDbContext dbContext, IConfiguration configuration, RoleManager <IdentityRole> roleManager) { this.userManager = userManager; this.signInManager = signInManager; this.logger = logger; this.emailService = emailService; this.dbContext = dbContext; this.configuration = configuration; this.totpGenerator = new TotpGenerator(); this.totpValidator = new TotpValidator(this.totpGenerator); this.roleManager = roleManager; }
public TotpValidator(ITotpGenerator totpGenerator) { this.totpGenerator = totpGenerator; }
public Totp(ITotpSetupGenerator totpSetupGenerator) { _totpSetupGenerator = totpSetupGenerator; _totpGenerator = new TotpGenerator(); _totpValidator = new TotpValidator(_totpGenerator); }
public TotpValidatorTests() { this.totpGenerator = new TotpGenerator(); this.totpValidator = new TotpValidator(this.totpGenerator); }