class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/web/games.html").permitAll()
.antMatchers("/api/games").permitAll()
.antMatchers("/resources/static/web/scripts/games.js").permitAll()
.antMatchers("/resources/static/web/css/games.css").permitAll()
.antMatchers("/web/**").hasAuthority("USER")
.antMatchers("/api/game_view/**").hasAuthority("USER")
.antMatchers("/resources/static/web/**").hasAuthority("USER");
http.formLogin()
.usernameParameter("name")
.passwordParameter("pwd")
.loginPage("/api/login");
http.logout().logoutUrl("/api/logout");
}