Code Monkey home page Code Monkey logo

qr-auth-svc's Introduction

QR Code Authentication API

This Application generates and validates QR Codes and UUID

Contents

The mapping of the URI path space is presented in the following table:

URI path Resource class HTTP methods
/qr/generate QRCodeEndpoint POST
/qr/validate QRCodeEndpoint POST
/config ConfigEndpoint GET
/config/{id} ConfigEndpoint GET
/config ConfigEndpoint POST
/config/{id} ConfigEndpoint PUT
/config/{id} ConfigEndpoint DELETE

Application is configured:

  • Without web.xml with SpringBoot and Jersey
  • Jersey/Spring annotations registers resources
  • HikariCP manage database pool connection
  • SpringJDBCTemplate to save and retrieve data from MySQL Database
  • EHCache to cache configurations
  • Swagger as Rest API Documentation

Running the API

Run the API as follows:

mvn clean package spring-boot:run

Once deployed, the application is ready to serve the following resources:

Swagger Documentation

SwaggerUI

Docker Configuration

QR Auth API

The following instructions will guide you for the basic usage of this image

  • First build project

      mvn clean install
    
  • Start the API

      docker run -d --name=qr-auth-api --restart=always --cpuset-cpus="0-3" --memory="2048m" --log-opt max-file=3 --log-opt max-size=50m  qr-auth-api:latest
    
  • Alternatively you could run the executable jar:

      java -jar qr-auth-svc-0.0.1-SNAPSHOT.jar -Xms512m -Xmx1024m -XX:MaxPermSize=1024m -XX:PermSize=1024
    
      or
    
      nohup java -jar qr-auth-svc-0.0.1-SNAPSHOT.jar -Xms512m -Xmx1024m -XX:MaxPermSize=1024m -XX:PermSize=1024 &        
    

MySQL

  docker run --name mysql --restart=always -v /tmp/mysql/data/:/var/lib/mysql -d -p 3306:3306 -e MYSQL_ROOT_PWD=toor -e MYSQL_USER=swAuth -e MYSQL_USER_PWD=sw4uth -e MYSQL_USER_DB=auth leafney/docker-alpine-mysql

SUPPORT

Contact me:

qr-auth-svc's People

Contributors

lucas811 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.