Update WebSecurityConfig.java

This commit is contained in:
Rufina Uche 2023-10-07 12:49:07 +01:00 committed by GitHub
parent 1b1ba05a50
commit 8177e74307
1 changed files with 7 additions and 4 deletions

View File

@ -17,15 +17,18 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userDetailsService).passwordEncoder(new BCryptPasswordEncoder());
auth
.userDetailsService(userDetailsService)
.passwordEncoder(new BCryptPasswordEncoder());
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
http
.authorizeRequests()
.antMatchers("/").permitAll()
.anyRequest().authenticated()
.and()
.formLogin();
.and()
.formLogin();
}
}