Package org.springframework.security.ldap.populator

Examples of org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator


   * Note that the UserDetailsService used by Spring Security is re-used here.
   * </p>
   */
  @Test
  public void testGetAuthoritiesForUser2() {
    DefaultLdapAuthoritiesPopulator populator = new DefaultLdapAuthoritiesPopulator( getContextSource(), "ou=roles" ); //$NON-NLS-1$
    populator.setGroupRoleAttribute( "cn" ); //$NON-NLS-1$
    populator.setGroupSearchFilter( "(roleOccupant={0})" ); //$NON-NLS-1$

    LdapUserSearch userSearch = getUserSearch( "ou=users", "(uid={0})" ); //$NON-NLS-1$//$NON-NLS-2$

    LdapUserDetailsService service = new LdapUserDetailsService( userSearch, populator );

View Full Code Here


  /**
   * Same as above except sorted.
   */
  @Test
  public void testGetAuthoritiesForUser2Sorted() {
    DefaultLdapAuthoritiesPopulator populator = new DefaultLdapAuthoritiesPopulator( getContextSource(), "ou=roles" ); //$NON-NLS-1$
    populator.setGroupRoleAttribute( "cn" ); //$NON-NLS-1$
    populator.setGroupSearchFilter( "(roleOccupant={0})" ); //$NON-NLS-1$

    LdapUserSearch userSearch = getUserSearch( "ou=users", "(uid={0})" ); //$NON-NLS-1$//$NON-NLS-2$

    LdapUserDetailsService service = new LdapUserDetailsService( userSearch, populator );

View Full Code Here

*/
public class UnionizingLdapAuthoritiesPopulatorTests extends AbstractPentahoLdapIntegrationTests {

  @Test
  public void testGetGrantedAuthorities() throws Exception {
    DefaultLdapAuthoritiesPopulator wrappedPop;
    wrappedPop = new DefaultLdapAuthoritiesPopulator( getContextSource(), "ou=roles" ); //$NON-NLS-1$
    wrappedPop.setRolePrefix( "ROLE_" ); //$NON-NLS-1$
    wrappedPop.setGroupSearchFilter( "(roleOccupant={0})" ); //$NON-NLS-1$

    DefaultLdapAuthoritiesPopulator wrappedPop2;
    wrappedPop2 = new DefaultLdapAuthoritiesPopulator( getContextSource(), "ou=groups" ); //$NON-NLS-1$
    wrappedPop2.setRolePrefix( "ROLE_" ); //$NON-NLS-1$
    wrappedPop2.setGroupSearchFilter( "(uniqueMember={0})" ); //$NON-NLS-1$

    Set populators = new HashSet();
    populators.add( wrappedPop );
    populators.add( wrappedPop2 );
    UnionizingLdapAuthoritiesPopulator unionizer = new UnionizingLdapAuthoritiesPopulator();
View Full Code Here

TOP

Related Classes of org.springframework.security.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.