Examples of LdapUserSearch


Examples of org.springframework.security.ldap.LdapUserSearch

   *
   * @throws Exception
   */
  @Test
  public void testGetAuthoritiesForUser1() throws Exception {
    LdapUserSearch userSearch = getUserSearch( "ou=users", "(uid={0})" ); //$NON-NLS-1$//$NON-NLS-2$

    LdapUserDetailsService service = new LdapUserDetailsService( userSearch, new NoOpLdapAuthoritiesPopulator() );

    RolePreprocessingMapper mapper = new RolePreprocessingMapper();
    mapper.setRoleAttributes( new String[] { "uniqueMember" } ); //$NON-NLS-1$
View Full Code Here

Examples of org.springframework.security.ldap.LdapUserSearch

  @Test
  public void testGetAuthoritiesForUser1ForTenant() throws Exception {
    ITenant defaultTenant = new Tenant( "/pentaho/tenant0", true );
    login( "suzy", defaultTenant );

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

    LdapUserDetailsService service = new LdapUserDetailsService( userSearch, new NoOpLdapAuthoritiesPopulator() );

    RolePreprocessingMapper mapper = new RolePreprocessingMapper();
    mapper.setRoleAttributes( new String[] { "uniqueMember" } ); //$NON-NLS-1$
View Full Code Here

Examples of org.springframework.security.ldap.LdapUserSearch

  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 );

    DefaultLdapUserRoleListService userRoleListService = new DefaultLdapUserRoleListService();
View Full Code Here

Examples of org.springframework.security.ldap.LdapUserSearch

  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 );

    DefaultLdapUserRoleListService userRoleListService = new DefaultLdapUserRoleListService();
View Full Code Here

Examples of org.springframework.security.ldap.search.LdapUserSearch

     * @param contextSource the {@link BaseLdapPathContextSource} to use
     * @return the {@link LdapAuthenticator} to use
     */
    private LdapAuthenticator createLdapAuthenticator(BaseLdapPathContextSource contextSource) {
        AbstractLdapAuthenticator ldapAuthenticator = passwordEncoder == null ? createBindAuthenticator(contextSource) : createPasswordCompareAuthenticator(contextSource);
        LdapUserSearch userSearch = createUserSearch();
        if(userSearch != null) {
            ldapAuthenticator.setUserSearch(userSearch);
        }
        if(userDnPatterns != null && userDnPatterns.length > 0) {
            ldapAuthenticator.setUserDnPatterns(userDnPatterns);
View Full Code Here

Examples of org.springframework.security.ldap.search.LdapUserSearch

     * @param contextSource the {@link BaseLdapPathContextSource} to use
     * @return the {@link LdapAuthenticator} to use
     */
    private LdapAuthenticator createLdapAuthenticator(BaseLdapPathContextSource contextSource) {
        AbstractLdapAuthenticator ldapAuthenticator = passwordEncoder == null ? createBindAuthenticator(contextSource) : createPasswordCompareAuthenticator(contextSource);
        LdapUserSearch userSearch = createUserSearch();
        if(userSearch != null) {
            ldapAuthenticator.setUserSearch(userSearch);
        }
        if(userDnPatterns != null && userDnPatterns.length > 0) {
            ldapAuthenticator.setUserDnPatterns(userDnPatterns);
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.