{"id":20173272,"url":"https://github.com/teedjay/playground-keycloak","last_synced_at":"2026-05-08T20:32:07.208Z","repository":{"id":73156837,"uuid":"145166163","full_name":"teedjay/playground-keycloak","owner":"teedjay","description":"Playing with OIDC and JWT using Keycloak and JEE8","archived":false,"fork":false,"pushed_at":"2018-09-04T11:35:19.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T04:41:48.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/teedjay.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-17T20:59:41.000Z","updated_at":"2018-09-04T11:35:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f41426f-9aef-4429-9719-e24541f38545","html_url":"https://github.com/teedjay/playground-keycloak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teedjay/playground-keycloak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-keycloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-keycloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-keycloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-keycloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teedjay","download_url":"https://codeload.github.com/teedjay/playground-keycloak/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-keycloak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32795883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-14T01:34:36.315Z","updated_at":"2026-05-08T20:32:07.185Z","avatar_url":"https://github.com/teedjay.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# playground-keycloak\nPlaying with OIDC and JWT using Keycloak and JEE8\n\n## To compile, package and run\n```\nmvn clean package\nmvn payara-micro:start\n```\n\n## Open the application\n```\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/index.html      \u003c== The menu page\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/swagger.html    \u003c== Interactive Swagger UI \n```\n\n## Available URL's\n```\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/frontend\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/backend\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/restapi\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/serverside\n\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/swagger.html\n```\n\n## Things to test ...\nTest out to \"two legged authentication\", using client service account instead of users accounts between api's.\n- [x] Add Swagger UI\n- [x] Add OpenAPI security to backend-layer\n- [ ] Add OpenAPI security to api-layer \n- [ ] Enable service account for backend client\n- [ ] Add some roles to backend client\n- [ ] Enforce service account roles in api layer\n\n## How to manually get tokens and call services\n```\n\nTo use these URL's you need the following information\n\n$KEYCLOAK_URL = Your keycloak base url (https://xxxx)\n$REALM = The name of your realm\n$CLIENT_ID = The client ID you have defined in keycloak (access_type=confidential, direct access grants enabled=true)\n$CLIENT_SECRET = You'll find the secret unded the credentials tab of your client in key cloak\n$USERNAME = One of the realm users username\n$PASSWORD = One of the realm users password\n\n# Manually get a token directly :\ncurl --data \"grant_type=password\u0026client_id=$CLIENT_ID\u0026client_secret=$CLIENT_SECRET\u0026username=$USERNAME\u0026password=$PASSWORD\" \\\n$KEYCLOAK_URL/auth/realms/$REALM/protocol/openid-csonnect/token\n\n# Pass on the received token to the WEB BACKEND :\ncurl -i \\\n-H \"Authorization: Bearer $YOUR_TOKEN\" \\\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/backend\n\n# Pass on the received token to the RESTAPI :\ncurl -i \\\n-H \"Authorization: Bearer $YOUR_TOKEN\" \\\nhttp://localhost:8080/keycloak-1.0-SNAPSHOT/restapi\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteedjay%2Fplayground-keycloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteedjay%2Fplayground-keycloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteedjay%2Fplayground-keycloak/lists"}