I\'m trying to integrate Spring OAuth2 into Spring MVC REST. Most of the Spring OAuth2 examples, there is only ResourceServerConfigurerAdapter
and some of have
Here is a good answer https://stackoverflow.com/a/28604260, it looks like WebSecurityConfigurerAdapter is an order inferior to the ResourceServerConfigurerAdapter.
I have a WebSecurityConfigurerAdapter and a ResourceServerConfigurerAdapter, but the endpoints security configuration is in the ResourceServerConfigurerAdapter under:
public void configure(HttpSecurity http) throws Exception {
I also have the following configuration:
security:
oauth2:
resource:
filter-order: 3
Else the endpoints security configuration is ignored (I don't know why).