Relation between WebSecurityConfigurerAdapter and ResourceServerConfigurerAdapter

前端 未结 1 875
一整个雨季
一整个雨季 2020-12-13 07:06

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

相关标签:
1条回答
  • 2020-12-13 07:26

    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).

    0 讨论(0)
提交回复
热议问题