Open
Description
Currently it requires multiple beans to support embedded ldap support.
@Bean
UnboundIdContainer ldapContainer() {
UnboundIdContainer container = new UnboundIdContainer("dc=springframework,dc=org",
"classpath:users.ldif");
container.setPort(0);
return container;
}
@Bean
DefaultSpringSecurityContextSource contextSource(UnboundIdContainer container) {
return new DefaultSpringSecurityContextSource("ldap://localhost:" + container.getPort() + "/dc=springframework,dc=org");
}
It would be nice to provide single builder that creates/shuts down the embedded database and creates a DefaultSpringSecurityContextSource
similar to Spring's EmbeddedDatabaseBuilder
.