lvermeulen / Keycloak.Net

C# client for Keycloak 6.x
MIT License
203 stars 120 forks source link

Add query parameters to User Count endpoint #76

Open jamesfoster opened 2 years ago

jamesfoster commented 2 years ago

According to the docs (https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_getuserscount) you can a) specify no query parameters to return the count of all users, b) specify the search query parameter to filter by name email and username, or c) specify a combination of email, firstName, lastName, and username to filter the users matching the parameters specified. Although not explicitly stated, I assume this is the same for the "get users" endpoint (https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_getusers)

In this PR I've simply replicated what was there for the GetUsersAsync method for the query parameters declared in the documentation.