Multi-Tenant Resource Server

This bonus lab demonstrates the multi-tenancyarrow-up-right feature of Spring Security.

To start the resource server just run the class com.example.multitenant.MultiTenantServerAppApplication.

Provided API

This resource server just provides one API at http://localhost:9090arrow-up-right. The API is secured and is only accessible by specifying a bearer JSON web token as Authorization header.

The resource server is configured as multi-tenant and as such it accepts access tokens by the following identity providers:

To call the API use the following commands (Httpiearrow-up-right or Curlarrow-up-right). You may also use Postmanarrow-up-right instead if you like a UI more,

httpie

http localhost:9090 'Authorization: Bearer [access_token]'

curl

curl -H 'Authorization: Bearer [access_token]' \
-v http://localhost:9090 | jq

Using OKTA

To get an access token from Oktaarrow-up-right use one of the following commands.

httpie

curl

Using Auth0

To get an access token from Auth0arrow-up-right use one of the following commands.

httpie

curl

Last updated