2 Factor Authentication (2FA) Java code which used the Time-based One-time Password (TOTP) algorithm. You can use this code with the Google Authenticator mobile app or the Authy mobile or browser app.
generateBase32Secret()
to generate a secret key in base-32 format for the user. For example: "NY4A5CPJZ46LXZCP"
qrImageUrl(...)
to the user. Here's a sample which uses GoogleAPIs:generateCurrentNumberString(...)
.For more details, see the example program.
<dependencies>
<dependency>
<groupId>com.j256.two-factor-auth</groupId>
<artifactId>two-factor-auth</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
See the ChangeLog.txt file.