jordanmason-stleo
4 years ago
committed by
GitHub
4 changed files with 44 additions and 24 deletions
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
package MTGClone; |
||||
|
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity; |
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; |
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; |
||||
|
||||
@Configuration |
||||
@EnableWebSecurity |
||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { |
||||
|
||||
@Override |
||||
protected void configure(HttpSecurity http) throws Exception { |
||||
System.out.println("Called configure(HttpSecurity http);"); |
||||
http.authorizeRequests().antMatchers("/").permitAll().anyRequest().authenticated().and().formLogin().and() |
||||
.csrf().disable().logout(); |
||||
} |
||||
|
||||
// TODO: Login using SQLDriver.authenticateUser(username, password)
|
||||
|
||||
|
||||
} |
Loading…
Reference in new issue