| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | package com.dawn.jat.illuminati; |
||
| 12 | @Generated |
||
| 13 | @Configuration |
||
| 14 | @EnableWebSecurity |
||
| 15 | public class WebSecurityConfig extends WebSecurityConfigurerAdapter { |
||
| 16 | @Autowired |
||
| 17 | private UserAuthenticationProvider authProvider; |
||
| 18 | |||
| 19 | @Override |
||
| 20 | protected void configure(HttpSecurity http) throws Exception { |
||
| 21 | http.authorizeRequests() |
||
| 22 | .antMatchers("/api/**").permitAll() |
||
| 23 | .anyRequest().authenticated() |
||
| 24 | .and() |
||
| 25 | .formLogin() |
||
| 26 | .loginPage("/login") |
||
| 27 | .defaultSuccessUrl("/cms", true) |
||
| 28 | .permitAll() |
||
| 29 | .and() |
||
| 30 | .logout() |
||
| 31 | .deleteCookies("JSESSIONID") |
||
| 32 | .permitAll(); |
||
| 33 | } |
||
| 34 | |||
| 35 | @Override |
||
| 36 | protected void configure(AuthenticationManagerBuilder auth) throws Exception { |
||
| 37 | auth.authenticationProvider(authProvider); |
||
| 38 | } |
||
| 41 |