File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
spring-cloud-gateway/car-service/src/main/java/com/example/carservice Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 11package com .example .carservice ;
22
3+ import com .okta .spring .boot .oauth .Okta ;
34import org .springframework .context .annotation .Bean ;
45import org .springframework .security .config .annotation .method .configuration .EnableReactiveMethodSecurity ;
56import org .springframework .security .config .annotation .web .reactive .EnableWebFluxSecurity ;
@@ -21,6 +22,10 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
2122 .and ()
2223 .oauth2ResourceServer ()
2324 .jwt ();
25+
26+ // Uncomment to prevent redirect and only act as a resource server
27+ // Okta.configureResourceServer401ResponseBody(http);
28+
2429 return http .build ();
2530 // @formatter:on
2631 }
You can’t perform that action at this time.
0 commit comments