1.1 KiB
1.1 KiB
OAuth Test Setup
In order to test the OAuth-secured gateway configurations, please follow the steps below
Keycloak setup
- Clone or download the https://github.com/Baeldung/spring-security-oauth project
- Replace the file
oauth-rest/oauth-authorization-server/src/main/resources/baeldung-realm.json
with the one provider here - Go to the oauth-rest/oauth-authorization-server folder and use maven to build the project
- Run the Keycloack service with
mvn spring-boot:run
- Once Keycloak is up and running, go to
http://localhost:8083/auth/admin/master/console/#/realms/baeldung
and log in with usingbael-admin/pass
as credentials - Create two test users, so that one belongs to the Golden Customers group and the other doesn't.
Quotes backend
Use the provided maven profile:
$ mvn spring-boot:run -Pquotes-application
Gateway as Resource Server
Use the provided maven profile:
$ mvn spring-boot:run -Pgateway-as-resource-server
Gateway as OAuth 2.0 Client
Use the provided maven profile:
$ mvn spring-boot:run -Pgateway-as-oauth-client