Commit 6c5701ba authored by Rob Winch's avatar Rob Winch Committed by Phillip Webb

Use @Autowired AuthenticationManagerBuilder

Update documentation to use @Autowired AuthenticationManagerBuilder.

Fixes gh-244
parent 18cecd07
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment