Ensure the AuthenticationManager is created when needed

There was too much state really in the old implementation of
AuthenticationManagerConfiguration, and it was leading occasionally
to null pointers when method A assumed that method B had already
been called and it hadn't. This change manages to concentrate all the
references to an AuthenticationManagerBuilder into a single method
call, removoing the need for storing it at all.

Fixes gh-1556
This commit is contained in:
Dave Syer
2014-09-12 16:03:35 -05:00
parent 0950072b5e
commit 9902f98a3d
2 changed files with 50 additions and 29 deletions

View File

@@ -101,6 +101,7 @@ public class SampleWebSecureApplication extends WebMvcConfigurerAdapter {
.password("admin").roles("ADMIN", "USER").and().withUser("user")
.password("user").roles("USER");
}
}
}