{"id":22860117,"url":"https://github.com/el-abdel/keycloak-custom-rest-endpoint","last_synced_at":"2025-09-11T11:36:33.848Z","repository":{"id":45444639,"uuid":"323639115","full_name":"el-abdel/keycloak-custom-rest-endpoint","owner":"el-abdel","description":"Keycloak SPI: Custom REST endpoint that search for users by attribute","archived":false,"fork":false,"pushed_at":"2021-12-14T11:52:16.000Z","size":12,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T18:34:33.505Z","etag":null,"topics":["api","keycloak","rest"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/el-abdel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-22T13:50:06.000Z","updated_at":"2024-10-17T00:49:26.000Z","dependencies_parsed_at":"2022-09-16T16:13:42.382Z","dependency_job_id":null,"html_url":"https://github.com/el-abdel/keycloak-custom-rest-endpoint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el-abdel%2Fkeycloak-custom-rest-endpoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el-abdel%2Fkeycloak-custom-rest-endpoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el-abdel%2Fkeycloak-custom-rest-endpoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el-abdel%2Fkeycloak-custom-rest-endpoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/el-abdel","download_url":"https://codeload.github.com/el-abdel/keycloak-custom-rest-endpoint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251756210,"owners_count":21638848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","keycloak","rest"],"created_at":"2024-12-13T09:09:22.761Z","updated_at":"2025-04-30T17:50:06.881Z","avatar_url":"https://github.com/el-abdel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Keycloak Custom REST Endpoint\n=============================\n\nKeycloak custom REST endpoint that search for users by custom user attribute, providing a JWT access token and based on a realm role.\n\n## Keycloak Integration\n\nBuild the jar by running mvn install and copy the jar to keycloak's deployment folder.\n\n```\n${KEYCLOAK_HOME}/standalone/deployments\n```\n\n\u003e Keycloak support hot deployment so as soon jar file copied to above location it will create **(jar-name).deployed** file. \u003cbr\u003e\n\u003e Once application deployed correctly it will be added to keycloak server and visible under `server Info \u003e providers` details.\n\n## Testing\n\n1. Create a realm (if you don't have an active one) and add few users with a custom attribute to the realm.\n2. Add role `fetch_users` to your realm.\n3. Lookup Users\n    ```\n    curl -i --request GET http://localhost:8080/auth/realms/\u003crealm-name\u003e/get-users-by-custom-attr?key=attr_key\u0026value=attr_value --header \"Accept: application/json\" --header \"Authorization: Bearer $ACCESS_TOKEN\";\n    ``` \n\u003e This endpoint is accessible just for authenticated users. REST request must be authenticated with bearer access token of authenticated user and the user must be in realm role `fetch_users` in order to access the resource.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fel-abdel%2Fkeycloak-custom-rest-endpoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fel-abdel%2Fkeycloak-custom-rest-endpoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fel-abdel%2Fkeycloak-custom-rest-endpoint/lists"}