Closed mguerraferrer closed 1 year ago
Hi @danvega
Searching through the closed PRs, I noticed that the correct way to declare AntPathRequestMatcher is .securityMatcher(new AntPathRequestMatcher("/token"))
, but for some reason, it was changed in the actual code. Fixing that, everything works great
Hi @danvega
In the tokenSecurityFilterChain method of the SecurityConfig class,
http.requestMatcher(new AntPathRequestMatcher("/token"))
is declared, but the requestMatcher(AntPathRequestMatcher) method is not defined for the HttpSecurity type, so it gives an error.It can fixed doing something like this:
Anyway, after getting the granted token and trying to use it to access
"/"
or"/secure"
, you always get 401 Unauthorized. Could you take a look at this issue please?