Skip to content

Cobrijani/jwt-security-spring-boot-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JWT security autoconfigure

Build Status

  • Represents Auto-configured Spring Security on Jwt based authentication for spring boot monolith applications

  • Maven:

          <dependency>
              <groupId>com.github.cobrijani</groupId>
              <artifactId>jwt-security-spring-boot-starter</artifactId>
              <version>0.0.3</version>
          </dependency>
  • Gradle

compile('com.github.cobrijani:jwt-security-spring-boot-starter:0.0.3')

To use it:

  1. Get dependency

  2. Implement project specific classes below:

  • org.springframework.security.core.userdetails.UserDetails
  • org.springframework.security.core.userdetails.UserDetailsService
  1. POST on '/api/v1/login' with request body as below
  {
      "login": "user login in db or w/e",
      
      "password": "user password",
      
      "isRememberMe": "remember me"
  }
  
  1. If 'UserDetails' and 'UserDetailsService' are successfully implement according to your project you should get something like this
   {
   "id_token": "your jwt"
   }