[keycloak-dev] Allow to search for users by exact attribute match.
Thomas Darimont
thomas.darimont at googlemail.com
Tue Jan 19 03:58:27 EST 2016
Hi,
I was looking for a way to query users based on their exact username but it
turned out, that
org.keycloak.admin.client.resource.UsersResource.search(String, String,
String, String, Integer, Integer)
@GET
@Produces(MediaType.APPLICATION_JSON)
List<UserRepresentation> search(@QueryParam("username") String username,
@QueryParam("firstName") String
firstName,
@QueryParam("lastName") String
lastName,
@QueryParam("email") String email,
@QueryParam("first") Integer
firstResult,
@QueryParam("max") Integer
maxResults);
...
usersResource.search("exactusername",null,null, null, null, email, 0, 10)
generates a like %..% query in
JpaUserProvider.searchForUserByAttributes(...).
Since usernames are unique per realm I think it would make sense to be able
to perform a
query for the exact username (or perhaps the combination of other
attributes as well).
Was this omitted by design, or may I create a JIRA for this?
Cheers,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160119/a00d6f93/attachment.html
More information about the keycloak-dev
mailing list