Spring Boot and OAuth2, WebSecurityConfigurerAdapter vs ResourceServerConfigurerAdapter

What is the difference between WebSecurityConfigurerAdapter and ResourceServerConfigurerAdapter and which should have higher priority?

I do not see the difference if I am both the owner of the resources and the client. I can configure HttpSecurity in both classes.

EDIT:

What type of helpers should be added to WebSecurityConfigurerAdapter and which in ResourceServerConfigurerAdapter ? In some examples, I found that the WebSecurityConfigurerAdapter matches pages for login, registration, etc. And the ResourceServerConfigurerAdapter for the real resource. Is this the right way to do this?

+7
spring spring-boot spring-security-oauth2
source share
1 answer

ResourceServerConfigurerAdapter for setting access rules and paths protected by OAuth2 protection (some additional oauth2 filters are activated).

WebSecurityConfigurerAdapter for Spring Base Security Configuration.

+1
source share

All Articles