Interface OtpService
-
- All Known Implementing Classes:
OtpServiceImpl
public interface OtpServiceOTPService is used to determine if theUserSecretmatches the given validationcode.The base is the TOTP algorithm. We have included a thirdparty library which serves the code for the validity check
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetAuthenticatorURI(java.lang.String secretKey)Generate URI for use in authenticator appsbooleantryVerificationCode(java.lang.String verificationCode, java.lang.String secretKey)Use TOTP algorithm to verify validity of secret and verification code.
-
-
-
Method Detail
-
tryVerificationCode
boolean tryVerificationCode(java.lang.String verificationCode, java.lang.String secretKey)Use TOTP algorithm to verify validity of secret and verification code.- Parameters:
verificationCode- given verificationCodesecretKey- generated secret key- Returns:
- vericifcationCode matches secret key
-
getAuthenticatorURI
java.lang.String getAuthenticatorURI(java.lang.String secretKey)
Generate URI for use in authenticator apps- Returns:
- Google Authenticator URI
-
-