Code Monkey home page Code Monkey logo

aerogear-otp-java's Introduction

aerogear-otp-java - Java One Time Password API

A Java library for generating one time passwords according to RFC 4226..

This API is compatible with Google Authenticator apps available for Android and iPhone. You can follow the instructions here to install Google Authenticator.

Project Info
License: Apache License, Version 2.0
Build: Maven
Documentation: https://aerogear.org/docs/
Issue tracker: https://issues.jboss.org/browse/AGSEC
Mailing lists: aerogear-users (subscribe)
aerogear-dev (subscribe)

how to create a new project

basic use case

  1. add the maven dependency

     <dependency>
         <groupId>org.jboss.aerogear</groupId>
         <artifactId>aerogear-otp-java</artifactId>
         <version>1.0.0</version>
         <scope>compile</scope>
     </dependency>
    

Getting started

Use

  1. Time based OTP's

     String secret = Base32.random();
     Totp totp = new Totp(secret);
     totp.now(); //427773
     
     totp.verify("427773"); //true
     Thread.sleep(40);
     totp.verify("427773"); //false
    

Working example

  1. Go to http://controller-aerogear.rhcloud.com/aerogear-controller-demo/login
  2. Login with username: john and password: 123. Click on Give it a try.
  3. Now open google authenticator application at your phone
  4. Go to Add account
  5. Then ask to Scan barcode
  6. After that john account might be added
  7. On your web browser go to Try Google authenticator
  8. Enter username: john and password: 123 and use the current OTP on your mobile

For more details, please refer to our documentation

Are you feeling brave? Try from the snapshot releases!

 <dependency>
     <groupId>org.jboss.aerogear</groupId>
     <artifactId>aerogear-security</artifactId>
     <version>1.0.1-SNAPSHOT</version>
     <scope>compile</scope>
 </dependency>

Documentation

For more details about the current release, please consult our documentation.

Development

If you would like to help develop AeroGear you can join our developer's mailing list, join #aerogear on Freenode, or shout at us on Twitter @aerogears.

Also takes some time and skim the contributor guide

Questions?

Join our user mailing list for any questions or help! We really hope you enjoy app development with AeroGear!

Found a bug?

If you found a bug please create a ticket for us on Jira with some steps to reproduce it.

aerogear-otp-java's People

Contributors

danbev avatar danielpassos avatar lfryc avatar qmx avatar vibe13 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.