public interface ITOTPAuthenticator
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIME_STEP_SIZE |
static int |
DEFAULT_WINDOW_SIZE |
Modifier and Type | Method and Description |
---|---|
boolean |
authorize(String userName,
int verificationCode)
Checks a verification code against a secret key the specified time.
|
ITOTPAuthenticatorKey |
createCredentials(String userName)
Computes a new random shared secret along with verification code and scratch codes.
|
static final int DEFAULT_WINDOW_SIZE
static final int DEFAULT_TIME_STEP_SIZE
ITOTPAuthenticatorKey createCredentials(String userName) throws Exception
userName
- The user name.ITOTPAuthenticatorKey
Holding generated new random shared secretException
boolean authorize(String userName, int verificationCode) throws Exception
userName
- The user name.verificationCode
- The verification code of the specified userITOTPConfiguration
Exception