Package org.springframework.ldap.core

Examples of org.springframework.ldap.core.LdapTemplate.lookup()


        DefaultSpringSecurityContextSource contextSource = (DefaultSpringSecurityContextSource) appCtx.getBean(BeanIds.CONTEXT_SOURCE);

        // Check data is loaded
        LdapTemplate template = new LdapTemplate(contextSource);
        template.lookup("uid=ben,ou=people");
    }

    @Test
    public void useOfUrlAttributeCreatesCorrectContextSource() throws Exception {
        int port = getDefaultPort();
View Full Code Here


        DefaultSpringSecurityContextSource contextSource = (DefaultSpringSecurityContextSource) appCtx.getBean("blah");

        // Check data is loaded as before
        LdapTemplate template = new LdapTemplate(contextSource);
        template.lookup("uid=ben,ou=people");
    }

    @Test
    public void loadingSpecificLdifFileIsSuccessful() {
        appCtx = new InMemoryXmlApplicationContext(
View Full Code Here

        appCtx = new InMemoryXmlApplicationContext(
                "<ldap-server ldif='classpath*:test-server2.xldif' root='dc=monkeymachine,dc=co,dc=uk' />");
        DefaultSpringSecurityContextSource contextSource = (DefaultSpringSecurityContextSource) appCtx.getBean(BeanIds.CONTEXT_SOURCE);

        LdapTemplate template = new LdapTemplate(contextSource);
        template.lookup("uid=pg,ou=gorillas");
    }

    @Test
    public void defaultLdifFileIsSuccessful() {
        appCtx = new InMemoryXmlApplicationContext(
View Full Code Here

                        map.put("sn", (String)attrs.get("sn").get());
                        map.put("givenName", (String)attrs.get("givenName").get());
                        return map;
                    }
                };
            ldap.lookup(dn, new String[] {"cn", "mail", "sn", "givenName", "c"}, mapper2);
        } catch (Exception e) {
            e.printStackTrace();
        }

View Full Code Here

                        map.put("sn", (String)attrs.get("sn").get());
                        map.put("givenName", (String)attrs.get("givenName").get());
                        return map;
                    }
                };
            ldap.lookup(dn, new String[] {"cn", "mail", "sn", "givenName", "c"}, mapper2);
        } catch (Exception e) {
            e.printStackTrace();
        }

View Full Code Here

                        map.put("sn", (String)attrs.get("sn").get());
                        map.put("givenName", (String)attrs.get("givenName").get());
                        return map;
                    }
                };
            ldap.lookup(dn, new String[] {"cn", "mail", "sn", "givenName", "c"}, mapper2);
        } catch (Exception e) {
            e.printStackTrace();
        }

View Full Code Here

                        map.put("sn", (String)attrs.get("sn").get());
                        map.put("givenName", (String)attrs.get("givenName").get());
                        return map;
                    }
                };
            ldap.lookup(dn, new String[] {"cn", "mail", "sn", "givenName", "c"}, mapper2);
        } catch (Exception e) {
            e.printStackTrace();
        }

View Full Code Here

                        map.put("sn", (String)attrs.get("sn").get());
                        map.put("givenName", (String)attrs.get("givenName").get());
                        return map;
                    }
                };
            ldap.lookup(dn, new String[] {"cn", "mail", "sn", "givenName", "c"}, mapper2);
        } catch (Exception e) {
            e.printStackTrace();
        }

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.