authoritiesPopulator.setGroupRoleAttribute(groupRoleAttribute);
System.out.println("***********************************");
LdapAuthenticationProvider ldapAuthenticationProvider =
new LdapAuthenticationProvider(authenticator, authoritiesPopulator);
LdapUserInfo user = authenticator.authenticate(userDetails.getUsername(),
(String)authentication.getCredentials());
if (user != null) {
UserDetails u = ldapAuthenticationProvider.retrieveUser(userDetails.getUsername(),
authentication);
System.out.println("user " + u);