An open API service indexing awesome lists of open source software.

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

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)