@Bean public SecurityWebFilterChain configure(ServerHttpSecurity http) throws Exception { return http.authorizeExchange() .pathMatchers("/about").permitAll() .anyExchange().authenticated() .and().oauth2Login() .and().build(); } }
@Bean public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity httpSecurity) { httpSecurity .authorizeExchange() .anyExchange() .authenticated() .and().oauth2Login() .and() .oauth2ResourceServer() .jwt(); return httpSecurity.build(); } }