Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hantsy/spring-security-auth0-sample
Spring Security 5 with OAuth2/OIDC and Auth0 integration example
https://github.com/hantsy/spring-security-auth0-sample
jwt oauth2 oidc spring-security spring-webflux spring-webmvc
Last synced: 2 months ago
JSON representation
Spring Security 5 with OAuth2/OIDC and Auth0 integration example
- Host: GitHub
- URL: https://github.com/hantsy/spring-security-auth0-sample
- Owner: hantsy
- License: gpl-3.0
- Created: 2021-04-19T15:17:50.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T20:35:20.000Z (3 months ago)
- Last Synced: 2024-09-29T08:41:00.272Z (3 months ago)
- Topics: jwt, oauth2, oidc, spring-security, spring-webflux, spring-webmvc
- Language: TypeScript
- Homepage:
- Size: 778 KB
- Stars: 12
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Security 6 and Auth0 Integration sample
![build](https://github.com/hantsy/spring-security-auth0-sample/workflows/build/badge.svg)
## What is this?
This is a sample project demos how to use Auth0 IDP service to protect the RESTful APIs written in Spring WebMVC.
> If you are interested in the custom JWT authentication with the Spring WebMvc stack, check [spring-webmvc-jwt-sample](https://github.com/hantsy/spring-webmvc-jwt-sample/) for more details.
> If you are interested in the custom JWT authentication with the Spring WebFlux stack, check [spring-reactive-jwt-sample](https://github.com/hantsy/spring-reactive-jwt-sample/) for more details.
## Guide
* [Secures RESTful APIs with Spring Security 5 and Auth0](./docs/api.md)
## Prerequisites
Make sure you have installed the following software.
* Java 17 +
* Apache Maven 3.x
* Docker## Build
Clone the source codes from Github.
```bash
git clone https://github.com/hantsy/spring-security-auth0-sample
```Open a terminal, and switch to the root folder of the project, and run the following command to build the whole project.
```bash
docker-compose up postgres // start up a postgres
mvn clean install // build the project
```Run the application.
```bash
mvn spring-boot:run
// or from command line after building
java -jar target/xxx.jar
```## Contribution
Any suggestions are welcome, filing an issue or submitting a PR is also highly recommended.
## References
* [The Complete Guide to Angular User Authentication with Auth0](https://auth0.com/blog/complete-guide-to-angular-user-authentication/)
* [Quickstarts: Single-Page App/Angular](https://auth0.com/docs/quickstart/spa/angular)