Skip to content

SeReNb26/JWT-Authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JWT-Authentication

Json Web Token

Project Architecture

The project is based on three-layers architecture and respect SOLID principles.

- Repository(DAO) layer
This layer of the program is only responsible for selecting data from the database and should not depend on other layers.

- Service layer
The service layer is responsible for executing the entire business logic of the project. Uses the dependencies of the DAO layer.

- Controller layer
This layer is responsible for handling HTTP requests from the user. It uses the service layer dependencies.


Instructions for launching

  1. Download this project locally and open it in your IDE.
  2. Install MySQL and create a jwt_project schema in it.
  3. Go to "application.properties" file and change login and password to your own.
  4. Run the program.
  5. Go to http://localhost:8080 and use any account from ROLES article to login

Technologies used

  • Spring Core
  • Spring Web
  • Spring Security
  • Spring JPA Data
  • DB: SQL, MySQL
  • JJWT library
  • HTML, CSS, Thymeleaf
  • VCS: Git

Project end-points

Browser end-points:

  • Login page. (HttpMethod.Get, HttpMethod.POST, "/login") for unauthenticated users
  • Home page. (HttpMethod.GET, "/index" or "/") for any role
  • Launch page. (HttpMethod.GET, "/launch") for any role
  • Technologies page. (HttpMethod.GET, "/launch") for any role
  • Functionality page. (HttpMethod.GET, "/endpoints") for any role

Postman end-points:

  • Get all users. (HttpMethod.GET, "/users") for admin role
  • Get user by id. (HttpMethod.GET, "/users/{id}") for admin role
  • Create user. (HttpMethod.POST, "/users") for admin role
  • Update user by id. (HttpMethod.PUT, "/users/{id}") for admin role
  • Delete user by id. (HttpMethod.DELETE, "/users/{id}") for admin role

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors