logger.debug("Searching for roles for user '" + username
+ "', DN = " + "'" + userDn + "', with filter "
+ groupSearchFilter + " in search base '"
+ getGroupSearchBase() + "'");
}
SpringSecurityLdapTemplate authTemplate;
authTemplate = (SpringSecurityLdapTemplate) LDAPUtils
.getLdapTemplateInContext(ctx, ldapTemplate);
Set<String> userRoles = authTemplate.searchForSingleAttributeValues(
getGroupSearchBase(), groupSearchFilter, new String[] { userDn,
username }, groupRoleAttribute);
if (logger.isDebugEnabled()) {
logger.debug("Roles from search: " + userRoles);