You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 31, 2022. It is now read-only.
It was hard to summarize this issue with a small amount of words, I'll use code instead.
My ResourceServer and AuthorizationServer are running in the same JVM.
My ResourceServer only protects "/rest/**" based urls, "/api-docs" url is not to be considered a protected resource.
My subclass of ResourceServerConfigurerAdapter defines
The problem is that when a request comes in with "/api-docs" path the security filter chain for the resource server is still triggered.
After debugging I found that my http.requestMatchers().antMatchers("/rest/**" )config is ignored because the actual RequestMatcheris a OrRequestMatcher combining NotOAuthRequestMatcher OR http.requestMatchers().antMatchers("/rest/**" ) which returns true in case of "/api-docs" incoming request.
I wonder is there a way or changing the OrRequestMatcher for an AndRequestMatcher using configuration ?