Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/hantsy/quarkus-auth0-sample

Secures Quarkus applications with OAuth2/Oidc and Auth0
https://github.com/hantsy/quarkus-auth0-sample

auth0 oauth2 oidc quarkus

Last synced: 10 days ago
JSON representation

Secures Quarkus applications with OAuth2/Oidc and Auth0

Awesome Lists containing this project

README

        

# quarkus-auth0-sample

## What is this?

This is a sample project demos how to use OAuth2/Oidc and Auth0 idp service to secure Quarkus applications.

> 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 APIs with Quarkus OIDC and Auth0](https://hantsy.medium.com/secures-restful-apis-with-quarkus-oidc-and-auth0-643475a9710c)

## Prerequisites

Make sure you have installed the following software.

* Java 16
* Apache Maven 3.8.x
* Docker

## Build

Clone the source codes from Github.

```bash
git clone https://github.com/hantsy/quarkus-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 quarkus:dev
// 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

* [Quarkus - Using OpenID Connect to Protect Service Applications using Bearer Token Authorization](https://quarkus.io/guides/security-openid-connect)