Skip to content

This Repository is used for references in the sector of JWT Security.

License

Notifications You must be signed in to change notification settings

lgsurith/spring-auth-ref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpringBoot JWT Authentication

This Repository is used for references in the sector of JWT Security.

Setup

Pre-Requisites :

  • Java version - 17
  • Spring Boot Packages
  • Maven 3.6 or higher.
  • Sql Workbench

Spring Dependencies :

  • Spring Boot Starters
  • JSON Web Token
  • Spring Security
  • Spring Configuration Processor
  • Spring Boot Test

Installation

  • Clone the Repository

    git clone https://github.com/lgsurith/spring-auth-ref.git
    cd spring-auth-ref
  • Configure MySql Database in application.properties

    spring.application.name=authapi
    spring.datasource.url = jdbc:mysql://localhost:3306/employee_auth
    spring.datasource.username = username
    spring.datasource.password= password
    spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
    spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
  • Build the Project

    mvn clean install
  • Run the Springboot Application

    mvn spring-boot:run

    The Application will start in http://localhost:8080

API Endpoints

Endpoint Description
/api/auth/signup Initial user signup without authentication.
/api/auth/login Obtain the token while logging in, which will be used for authentication by passing it in the bearer token.
/api/user/me Gets the particular user's information after authentication.
/api/user/ Gets all the users from the database.

Video Walkthrough :

reference_video.mp4

About

This Repository is used for references in the sector of JWT Security.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages