From 5ca98df7caebf56990e26aa83a1a2b626ba16660 Mon Sep 17 00:00:00 2001 From: Kamal Wickramanayake Date: Mon, 6 Jul 2026 06:32:08 +0530 Subject: Microservices: Documentation improved --- microservices/02-api-gateway/src/main/resources/application.yaml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'microservices/02-api-gateway/src/main/resources/application.yaml') diff --git a/microservices/02-api-gateway/src/main/resources/application.yaml b/microservices/02-api-gateway/src/main/resources/application.yaml index f51dbfe..4e1f9e7 100644 --- a/microservices/02-api-gateway/src/main/resources/application.yaml +++ b/microservices/02-api-gateway/src/main/resources/application.yaml @@ -2,6 +2,8 @@ server: port: 8050 address: 127.0.0.1 +# From where this API gatway can load roles of authenticated users? +# Look at the README file for details. app: userRolesUrl: "http://localhost:8052/myservices/security/open/users/{username}/roles" @@ -49,6 +51,7 @@ spring: - PrefixPath=/myservices - TokenRelay # Add oauth (or jwt) token to request header before forwarding + # Register this API gateway as an OAuth2 client with the OAuth2 authorization server security: oauth2: client: @@ -66,6 +69,9 @@ spring: scope: - openid - profile + +# Instead of coding a SecurityConfig class with OAuth2 configurations, com.c4-soft.springaddons dependency +# allows configuring some OAuth2 behaviour within this application.yaml file. This is just convenient. com: c4-soft: springaddons: -- cgit v1.2.3