Spring Security OAuth2 - @EnableOauth2Sso but accept tokens as authentication, too

前端 未结 2 1425
闹比i
闹比i 2020-12-29 14:36

I have an application which has @EnableOAuth2Sso on the WebSecurityConfigurerAdapter

After adding @EnableOAuth2Ssothe applica

2条回答
  •  一生所求
    2020-12-29 15:09

    This is an answer for your first question. You getting this exception because you are trying to add a filter to a filer chain without specifying an order. The filter chain consist of several filters in a fixed order. The exception is thrown in the check for the existenceof the filter to add. The org.springframework.security.config.annotation.AlreadyBuiltException in the AbstractSecurityBuilder when an exception happens inside it. So a wide range of exceptions happening inside the AbstractSecurityBuilder are causing this unrelated exception.

    A possible way to add your filter would be to use the addFilterBefore(Filter filter, Class beforeFilter) or the addFilterAfter(Filter filter, Class afterFilter) methods of HttpSecurity.

    Regarding your 2nd question, you should provide more information.

提交回复
热议问题