Skip to content

Commit

Permalink
OP-22248: setting auth manager to SecurityFilterChain to directly to …
Browse files Browse the repository at this point in the history
…ensure right object is set.
  • Loading branch information
rahul-chekuri committed Jun 14, 2024
1 parent bfec5b8 commit e992eb8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ public BasicAuthConfig(AuthConfig authConfig, BasicAuthProvider authProvider) {
this.authProvider = authProvider;
}

@Bean
public AuthenticationManager authManager(HttpSecurity http) throws Exception {
private AuthenticationManager authManager(HttpSecurity http) throws Exception {
AuthenticationManagerBuilder authenticationManagerBuilder =
http.getSharedObject(AuthenticationManagerBuilder.class);
if (name == null || name.isEmpty() || password == null || password.isEmpty()) {
Expand Down Expand Up @@ -95,7 +94,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.csrf().disable();
http.formLogin()
.and()
// .authenticationManager(authManager(http))
.authenticationManager(authManager(http))
.httpBasic()
.authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/login"));
authConfig.configure(http);
Expand Down

0 comments on commit e992eb8

Please sign in to comment.