Examples of SpringSecurityLdapTemplate


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

Examples of org.springframework.security.ldap.SpringSecurityLdapTemplate

            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
Copyright © 2018 www.massapi.com. 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.