<commit_before>package app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
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 {
		http.httpBasic();

		http.authorizeRequests().antMatchers("/events", "/console/*").hasRole("ADMIN") // Authorization
				.anyRequest().authenticated(); // All requests must be authenticated

		// Dev ONLY:
		http.csrf().disable();
		http.headers().frameOptions().disable();
	}
<commit_msg>Update WebSecurityConfig.java<commit_after>package app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
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 {
		http.httpBasic();

		http.authorizeRequests()
			.anyRequest().authenticated() // All requests must be authenticated
			.antMatchers("/events", "/console/*").hasRole("ADMIN"); // Authorization

		// Dev ONLY:
		http.csrf().disable();
		http.headers().frameOptions().disable();
	}

{'fraction_non_alphanumeric': 0.10870634530250861, 'fraction_numerical': 0.0, 'mean_word_length': 6.823076923076923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3507078', 'n_tokens_mistral': 520, 'n_tokens_neox': 496, 'n_words': 86}