Interface TwoFactorAuthenticationService
-
- All Known Implementing Classes:
TwoFactorAuthenticationServiceImpl
public interface TwoFactorAuthenticationServiceService to use inTwoFactorAuthenticationFilterandTwoFactorAuthenticationController
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddisableForUser()Disable 2 factor authentication for the current uservoidenableForUser()java.lang.StringgenerateSecretKey()booleanisConfiguredForUser()Check if the user is 2 factor authentication ready.booleanisVerificationCodeValidForUser(java.lang.String verificationCode)Check verificationcode given by user from Google AuthenticatorvoidresetSecretForUser()voidsaveSecretForUser(java.lang.String secret)Add generated userSecret to userdata.booleanuserIsBlocked()
-
-
-
Method Detail
-
isVerificationCodeValidForUser
boolean isVerificationCodeValidForUser(java.lang.String verificationCode)
Check verificationcode given by user from Google Authenticator- Parameters:
verificationCode- code given by user from Google Authenticator- Returns:
- is verificationCode valid
-
userIsBlocked
boolean userIsBlocked()
- Returns:
- user had too many authentication failures
-
saveSecretForUser
void saveSecretForUser(java.lang.String secret)
Add generated userSecret to userdata.- Parameters:
secret- given secret for user
-
resetSecretForUser
void resetSecretForUser()
-
enableForUser
void enableForUser()
-
disableForUser
void disableForUser()
Disable 2 factor authentication for the current userRemoves the secret key and set the TwoFactorAuthentication field to false
-
isConfiguredForUser
boolean isConfiguredForUser()
Check if the user is 2 factor authentication ready.- Returns:
- is configured for user
-
generateSecretKey
java.lang.String generateSecretKey()
- Returns:
- the secretkey for logged in user
-
-