public class TOTPTokenProvider extends Object implements TokenProvider
The totpTokenProvider uses the Time-based One-time Password (TOTP) algorithm specified in RFC 6238 to verify tokens using a pre-shared secret.
The tokens consist of 6 digits.
The user's attribute secret is used as the pre-shared secret. If this attribute is missing, the login attempt fails.
Note that the server's system time is taken into account when verifying tokens.
It is possible, for example, to use the Google Authenticator App to store the pre-shared secret and generate such tokens.
| Constructor and Description |
|---|
TOTPTokenProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(Router router) |
void |
requestToken(Map<String,String> userAttributes) |
void |
verifyToken(Map<String,String> userAttributes,
String token) |
public void init(Router router)
init in interface TokenProviderpublic void requestToken(Map<String,String> userAttributes)
requestToken in interface TokenProviderpublic void verifyToken(Map<String,String> userAttributes, String token)
verifyToken in interface TokenProviderCopyright © 2022. All Rights Reserved.