Examples of EqualsFilter


Examples of org.springframework.ldap.filter.EqualsFilter

            Assert.notNull(user, "Property 'claimUser' not configured");

            String dn = null;

            AndFilter filter = new AndFilter();
            filter.and(new EqualsFilter("objectclass", "person")).and(new EqualsFilter("cn", user));

            //find DN of user
            AttributesMapper mapper =
                new AttributesMapper() {
                    public Object mapFromAttributes(Attributes attrs) throws NamingException {
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter


    private String getDnOfPrincipal(String principal) {
        String dn = null;
        AndFilter filter = new AndFilter();
        filter.and(new EqualsFilter("objectclass", "person")).and(new EqualsFilter("cn", principal));

        //find DN of user
        AttributesMapper mapper =
            new AttributesMapper() {
                public Object mapFromAttributes(Attributes attrs) throws NamingException {
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter

    protected Filter getSearchFilter(final Long id) {
        return new AndFilter().and(getLoadFilter()).and(new EqualsFilter(this.idAttribute, String.valueOf(id)));
    }

    protected Filter getLoadFilter() {
        return new EqualsFilter(SpringLdapUtils.OBJECTCLASS_ATTRIBUTE, this.objectclass);
    }
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter

        dn.add(this.namingAttribute, service.getName());
        return new DirContextAdapter(dn);
    }

    protected Filter getSearchFilter(final Long id) {
        return new AndFilter().and(getLoadFilter()).and(new EqualsFilter(this.idAttribute, String.valueOf(id)));
    }
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter

            }
        }
       
        AndFilter filter = new AndFilter();
        filter.and(
                new EqualsFilter("objectclass", this.getObjectClass())).and(
                        new EqualsFilter(this.getUserNameAttribute(), user));

        List<String> searchAttributeList = new ArrayList<String>();
        for (RequestClaim claim : claims) {
            if (getClaimsLdapAttributeMapping().keySet().contains(claim.getClaimType().toString())) {
                searchAttributeList.add(
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter

            };
       
        List<?> result = null;
        AndFilter filter = new AndFilter();
        filter.and(
                new EqualsFilter("objectclass", objectClass)).and(
                        new EqualsFilter(filterAttributeName, filterAttributeValue));
       
        result = ldapTemplate.search((baseDN == null) ? "" : baseDN, filter.toString(),
            SearchControls.SUBTREE_SCOPE, searchAttributes, mapper);
        if (result != null && result.size() > 0) {
            ldapAttributes = CastUtils.cast((Map<?, ?>)result.get(0));
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter

        String[] searchAttributes = new String[] {searchAttribute}
       
        List<?> result = null;
        AndFilter filter = new AndFilter();
        filter.and(
            new EqualsFilter("objectclass", objectClass)).and(
                new EqualsFilter(filterAttributeName, filterAttributeValue));

        result = ldapTemplate.search((baseDN == null) ? "" : baseDN, filter.toString(),
            SearchControls.SUBTREE_SCOPE, searchAttributes, mapper);
        if (result != null && result.size() > 0) {
            ldapAttributes = CastUtils.cast((List<?>)result);
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter

                }
            };
       
        AndFilter filter = new AndFilter();
        filter.and(
            new EqualsFilter("objectclass", objectClass)).and(
                new EqualsFilter(filterAttributeName, filterAttributeValue));

        List<?> result = ldapTemplate.search((baseDN == null) ? "" : baseDN, filter.toString(),
            SearchControls.SUBTREE_SCOPE, mapper);
       
        if (result != null && result.size() > 0) {
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter

            Assert.notNull(user, "Property 'claimUser' not configured");

            String dn = null;

            AndFilter filter = new AndFilter();
            filter.and(new EqualsFilter("objectclass", "person")).and(new EqualsFilter("cn", user));

            //find DN of user
            AttributesMapper mapper =
                new AttributesMapper() {
                    public Object mapFromAttributes(Attributes attrs) throws NamingException {
View Full Code Here

Examples of org.springframework.ldap.filter.EqualsFilter

        }

        LdapTemplate template = new LdapTemplate(source);
        try {
            template.authenticate(DistinguishedName.EMPTY_PATH,
                    new EqualsFilter(configurationModel.getLdapConfiguration()
                            .getLdapUserId(), "test").toString(), "test");
            messages.showMessage(Level.INFO,
                    _("LDAP connection was successful"));
        } catch (Exception e) {
            LOG.info(e);
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.