Git Product home page Git Product logo

user-security-service's Introduction

Security Service CodeFactor Build Status

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. A few information:

Application:
 Running port: 8090
 Application context: /user-security
 Example: http://localhost:8090/user-security/

Authentication - AuthController
 Create: POST /auth/signup
 Signin: POST /auth/sigin
    Will return a JWT that must be sent as "Bearer" header on each request 

User Information - UserInfoController
 GET /userInfos/userInfo?userName=<username>
    Will return user information

Prerequisites

You must a MySQL database setup locally/remote with "user_security" setup.

  1. Install MySQL With docker:
# Docker compose for MySQL and "adminer":
version: '3'

services:
  mysqlsrv:
    image: mysql:5.7
    container_name: mysqlsrv
    environment:
      MYSQL_ROOT_PASSWORD: "MySql2020!"
      MYSQL_DATABASE: "user_security"
    ports:
      - "3306:3306"
    networks:
      - mysql-network

  adminer:
    image: adminer
    container_name: adminer
    ports:
      - 8080:8080
    networks:
      - mysql-network

networks: 
  mysql-compose-network:
    driver: bridge
# End

# Then run
docker-compose --project-name usersecproject up -d

# Check Adminer
http://localhost:8080/
  1. Create database user:
# Execute the script inside the project:
    src/main/resources/flyway/db/create-user.sql

Installing

Execute the checked out application

# Set your JAVA_HOME environment variable
export JAVA_HOME=<YOUR JAVA HOME>
# Go where the application is and
./mvnw spring-boot:run

Nothing more is required, the application - SpringBoot - is going to load all the required contexts: MySQL connection/Hikari database pool, Caffeine cache, Spring Mvc (with Tomcat)

Running the tests

The tests can be run by the following command:

./mvnw test

Documentation

You can find the swagger documentation by starting the application (check Installing) and pointing your browser to the following location: http://localhost:8090/user-security/swagger-ui.html

Built With

user-security-service's People

Contributors

fmvintu avatar

Watchers

 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.