Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEC-2191: AuthenticationManagerBuilder requires a ObjectPostProcessor #2418

Closed
spring-issuemaster opened this issue Jul 2, 2013 · 0 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link

commented Jul 2, 2013

Rob Winch (Migrated from SEC-2191) said:

In order to function properly, AuthenticationManagerBuilder requires an ObjectPostProcessor other than QUIESCENT_POSTPROCESSOR. We should provide a way to make use of AuthenticationManagerBuilder easier.

For example instead of:

@Configuration
@EnableGlobalMethodSecurity(prePostEnabled=true)
public class SampleWebSecurityConfig {

  @Bean
  public AuthenticationManager authenticationManager() throws Exception {
    return new AuthenticationManagerBuilder()
        .inMemoryAuthentication()
          .withUser("user").password("password").roles("USER").and()
        .build();
  }
}

We should support:

@Configuration
@EnableGlobalMethodSecurity(prePostEnabled=true)
public class SampleWebSecurityConfig {

  @Autowired
  public void authenticationManager(AuthenticationManagerBuilder auth) throws Exception {
    auth
        .inMemoryAuthentication()
          .withUser("user").password("password").roles("USER");
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.