Coder Social home page Coder Social logo

aolmez / spring-user-management Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tericcabrel/spring-user-management

0.0 0.0 0.0 346 KB

A REST API for User and Role management, token generation and validation

Shell 0.22% Java 96.86% HTML 2.72% Dockerfile 0.20%

spring-user-management's Introduction

Identity Authorization Service

A REST API for User and Role management, token generation and validation

Contents

Features

This features are available in this service

  • User Registration: Register user and send email for confirmation
  • Password reset: Send email with a reset link
  • Authentication with JWT: Generate JWT Access token and a random string for Refresh token the login
  • Logger: Log info/error message into a log file
  • Role based authorization: Allow or denied access to a resource according to user's role
  • Swagger: API Documented with Swagger 2
  • HTML Email: Use Thymeleaf to build HTML templates for email

Prerequisites

  • JDK 8
  • Maven
  • MongoDB
  • Redis

Installation

  • Clone the repository
$ git clone https://github.com/tericcabrel/identity-authorization.git [project_name]
  • Install dependencies
$ cd [project_name]
$ mvn install
  • Create the configuration file and update with your local config
$ cd src/main/resources
$ cp application-example.properties application.properties
$ nano application.properties
  • Start Application
$ mvn spring-boot:run

Note: An IDE like IntelliJ can perform these tasks for you automatically

Data Seed

Inside the package com.tericcabrel.authorization.bootstrap, the file named DataSeeder.java is responsible for loading data on application startup. It's there the creation of default roles (ROLE_ADMIN, ROLE_USER), and the Super Admin (the first user with the role: ROLE_ADMIN) are performed

Deployment

At the root of the folder, there is a file named deploy.sh who is bash file who content who contains scripts to deploy our app. The main steps are:

  • Backup the local configuration file and create one for production
  • Build .jar the package
  • Delete configuration for production and restore local configuration
  • Build docker image with his dependencies (see docker-compose.yml) and run the container

Tests

Unit tests and Integration tests will come soon

spring-user-management's People

Contributors

tericcabrel avatar dependabot[bot] 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.