package de.jottyfan.bico.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.web.SecurityFilterChain; /** * * @author jotty * */ @Configuration public class SecurityConfig { @Bean SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests( // @formatter:off r -> r.requestMatchers("/", "/error", "/css/**", "/js/**", "/webjars/**", "/template").permitAll() .requestMatchers("/**").authenticated()) .oauth2Login(l -> l.authorizationEndpoint(e -> e.baseUri("/oauth2/authorize-client"))); // @formatter:on return http.build(); } }