//public Otp() //{ // _otpStorage = new InMemoryOtpStorage(); //} public Otp(IOtpStorage otpStorage) { if (otpStorage == null) { throw new ArgumentNullException(nameof(otpStorage)); } _otpStorage = otpStorage; }
public OtpAppService(ISmsGateway smsGateway, IEmailSender emailSender, IOtpStorage otpStorage, IOtpGenerator passwordGenerator, ISettingManager settingManager, IOtpSettings otpSettings) { _smsGateway = smsGateway; _emailSender = emailSender; _otpStorage = otpStorage; _otpGenerator = passwordGenerator; _settingManager = settingManager; _otpSettings = otpSettings; }
public Otp(IOtpStorage otpStorage) { _otpStorage = otpStorage ?? throw new ArgumentNullException(nameof(otpStorage)); }