Giter VIP home page Giter VIP logo

spring-boot-otp's Introduction

Spring Boot OTP (One time password authentication)

Spring Boot project with demonstration of OTP authentication technique.

Running the project

  1. Create database with name otp
  2. Open terminal and navigate to your project
  3. Type command mvn install
  4. Type command mvn spring-boot:run

Check application running state

Route: http://localhost:8080/

Available profiles

  • Development profile (dev)
  • Production profile (prod)

Authentication

Route: /auth/authenticate
Method: POST
Content-Type: application/json
Request payload: { username: "admin", password: "admin" }
Response: { id_token: "token_hash" }

OTP routes that you can called after getting access token

  1. Generate OTP and send it to e-mail
    Route: /api/otp/generate
    Method: POST
    Empty request body in this case.

  2. Validate OTP
    Route: /api/otp/validate
    Method: POST
    Example Request Payload: { "otp": "your otp number" }


Packaging for production

  1. mvn clean
  2. mvn -Pprod package

Author

Heril Muratović
Software Engineer

Mobile: +38269657962
E-mail: [email protected]
Skype: hedza06
Twitter: hedzakirk
LinkedIn: https://www.linkedin.com/in/heril-muratovi%C4%87-021097132/
StackOverflow: https://stackoverflow.com/users/4078505/heril-muratovic

spring-boot-otp's People

Contributors

hedza06 avatar

Watchers

James Cloos 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.