Use @Autowired AuthenticationManagerBuilder

Update documentation to use @Autowired AuthenticationManagerBuilder.

Fixes gh-244
This commit is contained in:
Rob Winch
2014-01-20 16:45:13 -06:00
committed by Phillip Webb
parent 18cecd077d
commit 6c5701bacd

View File

@@ -297,11 +297,10 @@ point to a database or directory server, you only need to provide a
@Bean
public AuthenticationManager authenticationManager() throws Exception {
return new AuthenticationManagerBuilder(
ObjectPostProcessor.QUIESCENT_POSTPROCESSOR).inMemoryAuthentication().withUser("client")
.password("secret").roles("USER").and().and().build();
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication()
.withUser("client").password("secret").roles("USER");
}
Try it out: