The project I am working has spring security antMatcher
implemented as follows:
http.authorizeRequests()
.antMatchers("/v1/users/**").authenticated()
.antMatchers(HttpMethod.POST, "/v1/users/*/do").permitAll()
When I try to access /v1/users/2/do
i get an unauthorized error but I expected it to be accessible since I added "permitAll()" to the URL pattern.
I have tried:
.antMatchers(HttpMethod.POST, "/v1/users/{id}/do").permitAll()
I still get unauthorized access.