Package org.acegisecurity.providers.ldap.populator

Examples of org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator


     * Create a new DefaultLdapAuthoritiesPopulator object.
     *
     * @return a DefaultLdapAuthoritiesPopulator.
     */
    private DefaultLdapAuthoritiesPopulator create() {
        DefaultLdapAuthoritiesPopulator populator = new DefaultLdapAuthoritiesPopulator(
                initialDirContextFactory, groupSearchBase);
        populator.setConvertToUpperCase(convertToUpperCase);
        if (defaultRole != null) {
            populator.setDefaultRole(defaultRole);
        }
        populator.setGroupRoleAttribute(groupRoleAttribute);
        populator.setGroupSearchFilter(groupSearchFilter);
        populator.setRolePrefix(rolePrefix);
        populator.setSearchSubtree(searchSubtree);
        return populator;
    }
View Full Code Here


          BindAuthenticator authenticator = new BindAuthenticator(initialDirContextFactory);
          authenticator.setUserSearch(userSearch);
          authenticator.setUserDnPatterns(new String [] { "uid={0},ou=users"} );
         
          String groupSearchBase = "ou=groups";
          DefaultLdapAuthoritiesPopulator authoritiesPopulator =
            new DefaultLdapAuthoritiesPopulator(initialDirContextFactory,
                groupSearchBase);
          String groupRoleAttribute = "ou";
          authoritiesPopulator.setGroupRoleAttribute(groupRoleAttribute);
           
            System.out.println("***********************************");
          LdapAuthenticationProvider ldapAuthenticationProvider =
            new LdapAuthenticationProvider(authenticator, authoritiesPopulator);
          LdapUserInfo user = authenticator.authenticate(userDetails.getUsername(),
View Full Code Here

TOP

Related Classes of org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator

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.