Skip to content

Implement a flexible search in LDAP for the REST API auth #123

@belyaev-andrey

Description

@belyaev-andrey

Implement a flexible search in LDAP for the REST API controller LdapAuthController. Now we have a hardcoded simple method

    protected String buildPersonFilter(String login) {
        AndFilter filter = new AndFilter();
        filter.and(new EqualsFilter("objectclass", "person"))
                .and(new EqualsFilter(ldapUserLoginField, login));
        return filter.encode();
    }

Which cannot be overridden properly because overriding a Controller with mapping in Spring might be a challenging task.

Suggestion:

Extract this method to a service that will build the filter. Services can be overridden easily in CUBA, therefore, users will be able to create their own filters for LDAP search.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions