Skip to content

Commit b451fcf

Browse files
committed
Reformat CustomWebSecurityConfigurerAdapter
1 parent 6cca052 commit b451fcf

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

‎spring-security-basic-auth/src/main/java/org/baeldung/security/filter/configuration/CustomWebSecurityConfigurerAdapter.java‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,27 @@
1313
@Configuration
1414
@EnableWebSecurity
1515
public class CustomWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
16+
1617
@Autowired
1718
private MyBasicAuthenticationEntryPoint authenticationEntryPoint;
1819

1920
@Autowired
20-
public void configureGlobal(AuthenticationManagerBuilder auth)
21-
throws Exception {
22-
auth
23-
.inMemoryAuthentication()
24-
.withUser("user1").password("user1Pass")
25-
.authorities("ROLE_USER");
21+
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
22+
auth.inMemoryAuthentication()
23+
.withUser("user1").password("user1Pass")
24+
.authorities("ROLE_USER");
2625
}
2726

2827
@Override
2928
protected void configure(HttpSecurity http) throws Exception {
3029
http.authorizeRequests()
31-
.antMatchers("/securityNone").permitAll()
32-
.anyRequest().authenticated()
33-
.and()
34-
.httpBasic()
35-
.authenticationEntryPoint(authenticationEntryPoint);
30+
.antMatchers("/securityNone").permitAll()
31+
.anyRequest().authenticated()
32+
.and()
33+
.httpBasic()
34+
.authenticationEntryPoint(authenticationEntryPoint);
3635

3736
http.addFilterAfter(new CustomFilter(),
38-
BasicAuthenticationFilter.class);
37+
BasicAuthenticationFilter.class);
3938
}
4039
}

0 commit comments

Comments
 (0)