https://github.com/hantsy/spring-reactive-jwt-sample
Secures REST APIs with Spring Security and JWT Token-based Authentication powered by Spring Reactive stack
https://github.com/hantsy/spring-reactive-jwt-sample
jwt spring spring-boot spring-data-mongodb-reactive spring-security spring-webflux
Last synced: about 1 month ago
JSON representation
Secures REST APIs with Spring Security and JWT Token-based Authentication powered by Spring Reactive stack
- Host: GitHub
- URL: https://github.com/hantsy/spring-reactive-jwt-sample
- Owner: hantsy
- License: gpl-3.0
- Created: 2020-05-30T03:43:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T02:40:17.000Z (7 months ago)
- Last Synced: 2024-10-10T18:44:08.626Z (7 months ago)
- Topics: jwt, spring, spring-boot, spring-data-mongodb-reactive, spring-security, spring-webflux
- Language: Java
- Homepage: https://medium.com/@hantsy/protect-rest-apis-with-spring-security-reactive-and-jwt-7b209a0510f1
- Size: 524 KB
- Stars: 231
- Watchers: 5
- Forks: 55
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Reactive JWT Sample
[](https://github.com/pre-commit/pre-commit)


[](https://sonarcloud.io/dashboard?id=hantsy_spring-reactive-jwt-sample)
[](https://sonarcloud.io/dashboard?id=hantsy_spring-reactive-jwt-sample)
[](https://sonarcloud.io/dashboard?id=hantsy_spring-reactive-jwt-sample)[](https://travis-ci.com/hantsy/spring-reactive-jwt-sample)
[](https://www.codacy.com/manual/hantsy/spring-reactive-jwt-sample?utm_source=github.com&utm_medium=referral&utm_content=hantsy/spring-reactive-jwt-sample&utm_campaign=Badge_Grade)[](https://www.codacy.com/manual/hantsy/spring-reactive-jwt-sample?utm_source=github.com&utm_medium=referral&utm_content=hantsy/spring-reactive-jwt-sample&utm_campaign=Badge_Coverage)[](https://coveralls.io/github/hantsy/spring-reactive-jwt-sample?branch=master)
[](https://circleci.com/gh/hantsy/spring-reactive-jwt-sample)
[](https://codecov.io/gh/hantsy/spring-reactive-jwt-sample)[](https://cloud.drone.io/hantsy/spring-reactive-jwt-sample)
[](https://ci.appveyor.com/project/hantsy/spring-reactive-jwt-sample-7fhef)
[](https://hantsy.visualstudio.com/spring-reactive-jwt-sample/_build/latest?definitionId=1&branchName=master)
As an alternative of [spring-webmvc-jwt-sample](https://github.com/hantsy/spring-webmvc-jwt-sample) which is implemented in Spring Servlet stack, this sample project combines the latest Spring WebFlux, Spring Security to implement JWT token based authentication in Spring Reactive stack.
## Guide
[Secures RESTful APIs with Spring Security WebFlux and JWT Token Authentication](./docs/GUIDE.md)
## Build
Make sure you have installed the following software:
* Apache Maven 3.6
* JDK 17
* Docker for Desktop(for Windows users and MacOS users)
* Python (Optional for contributors)Clone the source codes into your local system.
```
git clone https://github.com/hantsy/spring-reactive-jwt-sample
```There is a *docker-compose.yml* file in the project root folder.
Run the following command to start up a MongoDb service .
```
docker-compose up mongodb
```> NOTE: You can install a local MongoDb instead of using Docker.
Then run the application by Spring boot maven plugin directly.
```
mvn spring-boot:run
```## Contribute
File an issue on Github issue if you have any idea.
If you want to send a PR directly, install python and `pre-commit` to check your git comments style and code style.
```python
pip install pre-commit
pre-commit install --hook-type commit-msg --hook-type pre-push
```