A standards based library that enables organization to adopt One Time Password (OTP) based 2 Factor Authentication (2FA) for Java/J2EE business critical applications
Fetching latest commit…
Cannot retrieve the latest commit at this time.


OTPManager - One time password library

Copyright (c) 2016, Great Software Laboratory Private Limited.

Contributor: Abdul Waheed [abdul.waheed@gslab.com]


OTPManager is a pluggable component that implements Time-based One-time Password TOTP algorithm specified in RFC 6238 and HMAC based One-time Password HOTP algorithm specified in RFC 4226. Using this component, a web application can support OTP Authentication without worrying much about the OTP implementation. It easily provide additional layer of security i.e. two factor authentication in any web application.

OTPManager is licensed under the Open Source License.

Client Application

OTPManager will act as Authenticator server whereas Google Authenticator application (available for iOS, Android, BlackBerry and Windows ) as a client to generates OTP code.

Library Documentation

This library includes full JavaDoc documentation and an example code to understand implementation of OTPManager library in a better way.


Requirements ( build dependencies )

* Java Version 6 or above
* Apache Maven 3 or higher



mvn clean install

It will create the 'OTPManager-1.0.0-archive.zip' file under OTPManager/target directory which will be having 'OTPManager-1.0.0.jar' 
as well as all others dependencies required for this project. It also contains one properties file named otp.properties.

Usage in code

See examples for working example.


The API documentation will get generated after mvn install under OTPManager/target/apidocs directory.

For OTPManager library implementation details, see IMPLEMENTATION.md


See the examples sub-directory.


File bug reports, feature requests and questions using GitHub Issues