Commit a0b604aa by Patryk Czarnik

SecurityConfig - domyślne ustawienia

parent 87212bc3
...@@ -12,8 +12,10 @@ public class SecurityConfig { ...@@ -12,8 +12,10 @@ public class SecurityConfig {
// (w ten sposób można też stworzyć "własne" beany, zamiast podejścia z adnotacją @Component) // (w ten sposób można też stworzyć "własne" beany, zamiast podejścia z adnotacją @Component)
@Bean @Bean
SecurityFilterChain setHttpSecurity(HttpSecurity httpSecurity) throws Exception { SecurityFilterChain setHttpSecurity(HttpSecurity httpSecurity) throws Exception {
httpSecurity.authorizeRequests() httpSecurity.authorizeHttpRequests()
.anyRequest().permitAll(); .anyRequest().authenticated()
.and()
.formLogin();
return httpSecurity.build(); return httpSecurity.build();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment