Skip to content

A JWT (json web token) authentication server using Java, Spring Framework, Gitlab CI/CD and more. 🔒

License

Notifications You must be signed in to change notification settings

valandro/spring-auth

Repository files navigation

License: MIT

Java Spring Data

Continuous integration status:

Build Status codecov

This project consists in an Authentication Service, using Jwts for generate JSON Web Tokens.

HTTP Methods

POST

Request Body

{
    "username": "some-user",
    "password": "some-pass"
}

Response - Status 200 OK

{  
   "token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJjbGllbnRJZFwiOjEsXCJhY2Nlc",
   "user_name": "Lucas",
   "access_level": 1
}

Response - Status 404 NOT FOUND

{
    "httpStatus": 404,
    "message": "Usuário não encontrado."
}

Sequence Diagram

Diagram

Data model

The database used in this project has the following structure:

COLUMNS TYPE EXTRA
id INT(11) AI, PK, NN
id_client INT(11) NN
name VARCHAR(255) NN
password VARCHAR(255) NN
access_level INT(11) NN
blocked INT(11) NN

Environment

  • Java JDK 10
  • Gradle 4.3 or higher

Dependencies

  • H2 Memory Database for integration tests
  • Spring Cloud Config for centralize properties

License

MIT License. Click here for more information.

About

A JWT (json web token) authentication server using Java, Spring Framework, Gitlab CI/CD and more. 🔒

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published