httpSecurity.authorizeExchange(exchanges ->
exchanges.pathMatchers("/demo/**").authenticated())
.oauth2ResourceServer(
oAuth2ResourceServerSpec -> {
oAuth2ResourceServerSpec.jwt(jwtSpec ->
jwtSpec.jwtDecoder(JwtDecoders.fromIssuerLocation("https://myapidomain/api")));
}).build();
httpSecurity.authorizeExchange(exchanges ->
exchanges.pathMatchers("/demo/**").authenticated())
.oauth2ResourceServer(
oAuth2ResourceServerSpec -> {
oAuth2ResourceServerSpec.jwt(jwtSpec ->
jwtSpec.jwtDecoder(JwtDecoders.fromIssuerLocation("https://myapidomain/api")));
}).build();