Commit 7236015a authored by checketts's avatar checketts Committed by Phillip Webb

Fix the AuthenticationManagerBuilder code snippet

Fix AuthenticationManagerBuilder code snippet to add the missing the
ObjectPostProcessor parameter for the constructor.

Issue: #45
parent 191894a1
...@@ -293,10 +293,13 @@ entry. If you want to extend or expand that, or point to a database ...@@ -293,10 +293,13 @@ entry. If you want to extend or expand that, or point to a database
or directory server, you only need to provide a `@Bean` definition for or directory server, you only need to provide a `@Bean` definition for
an `AuthenticationManager`, e.g. in your `SampleController`: an `AuthenticationManager`, e.g. in your `SampleController`:
@Bean @Bean
public AuthenticationManager authenticationManager() throws Exception { public AuthenticationManager authenticationManager() throws Exception {
return new AuthenticationBuilder().inMemoryAuthentication().withUser("client") return new AuthenticationManagerBuilder(
.password("secret").roles("USER").and().and().build(); ObjectPostProcessor.QUIESCENT_POSTPROCESSOR).inMemoryAuthentication().withUser("user")
.password("password").roles("USER").and().and().build();
} }
Try it out: 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