use of org.springframework.security.ldap.userdetails.Person in project spring-security by spring-projects.
the class LdapUserServiceBeanDefinitionParserTests method personContextMapperIsSupported.
@Test
public void personContextMapperIsSupported() {
setContext("<ldap-server ldif='classpath:test-server.ldif'/>" + "<ldap-user-service id='ldapUDS' user-search-filter='(uid={0})' user-details-class='person'/>");
UserDetailsService uds = (UserDetailsService) appCtx.getBean("ldapUDS");
UserDetails ben = uds.loadUserByUsername("ben");
assertThat(ben instanceof Person).isTrue();
}
Aggregations