Package org.springframework.security.ldap

Examples of org.springframework.security.ldap.SpringSecurityLdapTemplate


            // authenticate before LDAP searches
            user = ldapConfig.getUser();
            password = ldapConfig.getPassword();
            template = new BindingLdapTemplate(ldapContext);
        } else {
            template = new SpringSecurityLdapTemplate(ldapContext);
        }
   
        this.groupSearchBase = ldapConfig.getGroupSearchBase();
        if (isNotEmpty(ldapConfig.getGroupSearchFilter())) {
            this.groupSearchFilter = ldapConfig.getGroupSearchFilter();
View Full Code Here


            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);
View Full Code Here

TOP

Related Classes of org.springframework.security.ldap.SpringSecurityLdapTemplate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.