Skip to content
Snippets Groups Projects
Unverified Commit 36c4c6e0 authored by Matej Hrica's avatar Matej Hrica
Browse files

Make weather SecurityFilterChain more explicit

parent a94cdd58
No related branches found
No related tags found
No related merge requests found
package cz.muni.fi.pa165.weather.server.config;
import cz.muni.fi.pa165.user.client.Authorities;
import cz.muni.fi.pa165.user.client.UserServiceInterceptionConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -21,8 +22,8 @@ public class AppConfig {
.requestMatchers("/v3/api-docs/**").permitAll()
.requestMatchers(HttpMethod.GET, "/").permitAll()
.requestMatchers(HttpMethod.GET, "/swagger-ui.html").permitAll()
// default
.anyRequest().authenticated()
// MANAGER has access to everything in this service
.anyRequest().hasAuthority(Authorities.MANAGER)
)
.oauth2ResourceServer(OAuth2ResourceServerConfigurer::opaqueToken);
return http.build();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment