Fix auth for recipes search endpoint.
This commit is contained in:
parent
c088cb2253
commit
d61fb97dbb
@ -12,6 +12,7 @@ public class RecipesEndpointAuthConfigurator implements EndpointAuthConfigurator
|
|||||||
@Override
|
@Override
|
||||||
public void configure(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
|
public void configure(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
|
||||||
registry.requestMatchers(HttpMethod.GET, "/recipes/**").permitAll();
|
registry.requestMatchers(HttpMethod.GET, "/recipes/**").permitAll();
|
||||||
|
registry.requestMatchers(HttpMethod.POST, "/recipes").permitAll(); // search
|
||||||
registry.requestMatchers(HttpMethod.POST, "/recipes/**").authenticated();
|
registry.requestMatchers(HttpMethod.POST, "/recipes/**").authenticated();
|
||||||
registry.requestMatchers(HttpMethod.PUT, "/recipes/**").authenticated();
|
registry.requestMatchers(HttpMethod.PUT, "/recipes/**").authenticated();
|
||||||
registry.requestMatchers(HttpMethod.DELETE, "/recipes/**").authenticated();
|
registry.requestMatchers(HttpMethod.DELETE, "/recipes/**").authenticated();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user