https://github.com/clau-lopez/spring-security-jwt-integration
This project try to provide a easy way to use JWT in your Spring Security implementation
https://github.com/clau-lopez/spring-security-jwt-integration
java jwt jwt-authentication jwt-token spring spring-boot spring-security
Last synced: about 2 months ago
JSON representation
This project try to provide a easy way to use JWT in your Spring Security implementation
- Host: GitHub
- URL: https://github.com/clau-lopez/spring-security-jwt-integration
- Owner: clau-lopez
- License: gpl-3.0
- Created: 2017-10-01T22:09:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-08T20:09:51.000Z (over 8 years ago)
- Last Synced: 2025-05-11T21:55:36.042Z (about 1 year ago)
- Topics: java, jwt, jwt-authentication, jwt-token, spring, spring-boot, spring-security
- Language: Java
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Security JWT Integration
This project is a library that allow connect a Spring application using Spring Security and JWT easily.
## Maven Dependency
```
com.github.colopezfuentes
spring-security-jwt-integration
0.0.1-RELEASE
```
## How to Use it
- Include this dependency in your project.
- Setup the properties
- To generate a new token do a **POST** request a "http://localhost:MY_PORT/MY-CONTEXT-PATH/auth"
with
```
{
"user":"myUser",
"password":"myPassword"
}
```
- To request to any other secure endpoint include a header **"Authorization"** with the token.
## Suggestions
- Re implement a bean for DefaultPasswordEncoder
- Re implement a bean for DefaultUserDetailService
- Re implement a bean for DefaultWebSecurityConfig (optional)
These implementations are provided with a not secure default logic
## Properties
```
security.jwt.secret-key=
security.jwt.expiration-date= #In seconds
security.jwt.default-password=
security.jwt.default-user=
```
## Authors
[@colopezfuentes](https://github.com/colopezfuentes)
[@diegosep](https://github.com/diegosep)