public static SearchRequest newSearchRequest(final String baseDn, final FilterTemplate filter) {
        val sr = new SearchRequest(baseDn, filter);
        // TODO: this argument should be a list of individual attribute names
        //sr.setBinaryAttributes(ReturnAttributes.ALL_USER.value());
        sr.setReturnAttributes(ReturnAttributes.ALL_USER.value());
        sr.setSearchScope(SearchScope.SUBTREE);
        return sr;
    }
Builds a new request.

@param baseDn the base dn
@param filter the filter
@return the search request
pac4j-config/src/main/java/org/pac4j/config/ldaptive/LdaptiveAuthenticatorBuilder.java