use of uk.gov.di.authentication.shared.services.CodeStorageService in project di-authentication-api by alphagov.
the class RedisExtension method generateAndSavePhoneNumberCode.
public String generateAndSavePhoneNumberCode(String email, long codeExpiryTime) {
var code = new CodeGeneratorService().sixDigitCode();
new CodeStorageService(redis).saveOtpCode(email, code, codeExpiryTime, VERIFY_PHONE_NUMBER);
return code;
}
use of uk.gov.di.authentication.shared.services.CodeStorageService in project di-authentication-api by alphagov.
the class RedisExtension method generateAndSaveEmailCode.
public String generateAndSaveEmailCode(String email, long codeExpiryTime) {
var code = new CodeGeneratorService().sixDigitCode();
new CodeStorageService(redis).saveOtpCode(email, code, codeExpiryTime, VERIFY_EMAIL);
return code;
}
use of uk.gov.di.authentication.shared.services.CodeStorageService in project di-authentication-api by alphagov.
the class RedisExtension method generateAndSaveMfaCode.
public String generateAndSaveMfaCode(String email, long codeExpiryTime) {
var code = new CodeGeneratorService().sixDigitCode();
new CodeStorageService(redis).saveOtpCode(email, code, codeExpiryTime, MFA_SMS);
return code;
}
Aggregations