Exemplo n.º 1
0
 //public Otp()
 //{
 //    _otpStorage = new InMemoryOtpStorage();
 //}
 public Otp(IOtpStorage otpStorage)
 {
     if (otpStorage == null)
     {
         throw new ArgumentNullException(nameof(otpStorage));
     }
     _otpStorage = otpStorage;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public Otp(IOtpStorage otpStorage)
 {
     _otpStorage = otpStorage ?? throw new ArgumentNullException(nameof(otpStorage));
 }