Extend LdapIdentityProviderSession with custom attribute search

I’m using LDAPConfiguration for authentication and I also need to get some user data using IdentityService. It works fine, but I cannot find a way to create a user search query containing some other attribute than what is listed in UserQuery interface.
Is there some easier way to add some search attribute other than extending UserQuery, UserQueryImpl, LdapUserQueryImpl and LdapIdentityProviderSession classes?
Maybe there are some other things for consideration, but it seems like adding a generic map of attributes in UserQuery would work fine at least for both Ldap and Db providers.

public interface UserQuery extends Query<UserQuery, User> {

/** Only select {@link User}s with the given id/ */
UserQuery userId(String id);

....

/** Only select {@link User}s with the given attribute value/ */
UserQuery userAttributeIn(String attributeName, String value);   <----- I'm missing this

I will go this way if there’s nothing cleaner, I just don’t want to reinvent the wheel.