What is the difference between WebSecurityConfigurerAdapter
and ResourceServerConfigurerAdapter
and which should have higher precedence?
I don't really see difference if I am both resource owner and the client. I can configureHttpSecurity
in both classes.
EDIT:
Which type of matchers should I add in WebSecurityConfigurerAdapter
and which in ResourceServerConfigurerAdapter
? I found in some examples that WebSecurityConfigurerAdapter
matches pages for login, registration etc. and ResourceServerConfigurerAdapter
for the real resource. Is that a correct way of doing it?
ResourceServerConfigurerAdapter for adjust the access rules and paths that are protected by OAuth2 security (Some additional oauth2 filters activated).
WebSecurityConfigurerAdapter for the basic Spring Security customization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With