jwt-security-spring-boot-starter

Spring boot Jwt security auto configuration

License

License

Categories

Categories

Spring Boot Container Microservices Security
GroupId

GroupId

com.github.cobrijani
ArtifactId

ArtifactId

jwt-security-spring-boot-starter
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

jwt-security-spring-boot-starter
Spring boot Jwt security auto configuration
Project Organization

Project Organization

Pivotal Software, Inc.
Source Code Management

Source Code Management

https://github.com/Cobrijani/jwt-security-spring-boot-starter

Download jwt-security-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.cobrijani/jwt-security-spring-boot-starter/ -->
<dependency>
    <groupId>com.github.cobrijani</groupId>
    <artifactId>jwt-security-spring-boot-starter</artifactId>
    <version>0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.cobrijani/jwt-security-spring-boot-starter/
implementation 'com.github.cobrijani:jwt-security-spring-boot-starter:0.0.3'
// https://jarcasting.com/artifacts/com.github.cobrijani/jwt-security-spring-boot-starter/
implementation ("com.github.cobrijani:jwt-security-spring-boot-starter:0.0.3")
'com.github.cobrijani:jwt-security-spring-boot-starter:jar:0.0.3'
<dependency org="com.github.cobrijani" name="jwt-security-spring-boot-starter" rev="0.0.3">
  <artifact name="jwt-security-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.cobrijani', module='jwt-security-spring-boot-starter', version='0.0.3')
)
libraryDependencies += "com.github.cobrijani" % "jwt-security-spring-boot-starter" % "0.0.3"
[com.github.cobrijani/jwt-security-spring-boot-starter "0.0.3"]

Dependencies

compile (7)

Group / Artifact Type Version
org.springframework.security : spring-security-data jar
org.springframework.boot : spring-boot-starter-security jar 1.5.1.RELEASE
org.springframework.boot : spring-boot-starter-web jar 1.5.1.RELEASE
org.projectlombok : lombok Optional jar 1.16.12
io.jsonwebtoken : jjwt jar 0.5
org.springframework.boot : spring-boot-autoconfigure jar 1.5.1.RELEASE
io.javaslang : javaslang jar 2.0.5

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 1.5.1.RELEASE

Project Modules

There are no modules declared in this project.

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"
   }

Versions

Version
0.0.3
0.0.2