{"id":25301755,"url":"https://github.com/ahus1/keycloak-dropwizard-integration","last_synced_at":"2025-04-09T14:06:15.737Z","repository":{"id":36664287,"uuid":"40970642","full_name":"ahus1/keycloak-dropwizard-integration","owner":"ahus1","description":"This project shows how Red Hat Keycloak and Dropwizard can be used together.","archived":false,"fork":false,"pushed_at":"2025-01-13T16:19:18.000Z","size":739,"stargazers_count":54,"open_issues_count":8,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T08:48:33.458Z","etag":null,"topics":["dropwizard","dropwizard-bundle","hacktoberfest","keycloak"],"latest_commit_sha":null,"homepage":"https://ahus1.github.io/keycloak-dropwizard-integration/tutorial.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahus1.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2015-08-18T12:28:28.000Z","updated_at":"2025-03-03T12:17:51.000Z","dependencies_parsed_at":"2023-02-13T02:31:19.970Z","dependency_job_id":"b1bc85a3-16b7-4e85-b961-55752f4c4675","html_url":"https://github.com/ahus1/keycloak-dropwizard-integration","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahus1%2Fkeycloak-dropwizard-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahus1%2Fkeycloak-dropwizard-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahus1%2Fkeycloak-dropwizard-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahus1%2Fkeycloak-dropwizard-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahus1","download_url":"https://codeload.github.com/ahus1/keycloak-dropwizard-integration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054230,"owners_count":21039952,"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":["dropwizard","dropwizard-bundle","hacktoberfest","keycloak"],"created_at":"2025-02-13T06:48:58.770Z","updated_at":"2025-04-09T14:06:15.687Z","avatar_url":"https://github.com/ahus1.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"ifdef::env-github[:outfilesuffix: .adoc]\n:ext-relative: {outfilesuffix}\n\n= Integration of Keycloak and Dropwizard\n:icons: font\n\n== About\n\n=== Summary\n\nThis project shows how Keycloak and Dropwizard can be used together.\nAt the time I wrote this there was no open source integration of the two, so I set up this project.\n\nifdef::env-github[To read this tutorial fully rendered, please visit: https://ahus1.github.io/keycloak-dropwizard-integration/tutorial.html.]\n\nifndef::env-github[To read the latest version of this tutorial, please visit: https://ahus1.github.io/keycloak-dropwizard-integration/tutorial.html.]\n\nhttp://keycloak.org[Keycloak^] provides a standalone OAuth 2.0 and Open ID Connect server.\nIt handles user credentials for your application, so you can focus on business requirements.\n\nhttp://dropwizard.io[Dropwizard^] is a Java framework for developing ops-friendly, high-performance, REST-ful web services.\n\nThe versions 1.0.x and 2.0.x of this project showed alternative ways to integrate Keycloak's client libraries with Dropwizard versions 1.x to 3.x.\nWith Dropwizard version 4.x, Dropwizard upgraded from Java EE to Jakarta EE.\nAs this would have required additional migration efforts which an unclear added value to users, those have been removed. They might be added in the future if there is co\n\n=== How to use\n\nThe module `keycloak-dropwizard` is a ready-to-use Dropwizard module.\nThe releases are available from Maven central.\n\nThe releases depend on a version of Dropwizard and Keycloak that was current at release time.\nTo use a more recent release, please add them as an explicit dependency to your project, as this project will not release new versions on every minor or patch release of its dependencies.\n\nAs Keycloak removed some of its client adapters, the latest version of the Keycloak client libraries to use is 24.0.5.\n\nimage:https://img.shields.io/maven-central/v/de.ahus1.keycloak.dropwizard/keycloak-dropwizard-parent[Maven Central,link=https://mvnrepository.com/artifact/de.ahus1.keycloak.dropwizard/keycloak-dropwizard]\nimage:https://github.com/ahus1/keycloak-dropwizard-integration/workflows/Java%20CI%20with%20Maven/badge.svg?branch=master[Build Status,link=https://github.com/ahus1/keycloak-dropwizard-integration/actions?query=workflow%3A%22Java+CI+with+Maven%22+branch%3Amaster]\n\n  * Version 0.7.x is tested with Keycloak 1.9.x and Dropwizard 0.9.x\n\n  * Version 0.8.x is tested with Keycloak 2.x.x and Dropwizard 0.9.x\n\n  * Version 0.9.x is tested with Keycloak 2.x.x/3.x.x and Dropwizard 1.0.x\n\n  * Version 1.0.x is tested with Keycloak 3.x.x and Dropwizard 1.1.x/1.2.x/1.3.x\n\n  * Version 1.1.x/1.2.x is tested with Keycloak 4.x-21.x and Dropwizard 1.3.x/2.0.x/2.1.x\n\n  * Version 2.x is tested with Keycloak 4.x-23.x and Dropwizard 3.0.x\n\n  * Version 3.x is tested with Keycloak 23.x-25.x and Dropwizard 4.0.x\n\n[WARNING]\n--\nStarting with Dropwizard 2.0 and the included version of Jersey, a login performed during a POST for a form will not recover the contents of the POST.\nThis is wired into Keycloak's _JettyAdapterSessionStore_ (that restores the content type and the parameters to the request), but Jersey's _InboundMessageContext_ that wants to read the information in the request's header and the body.\nSee the _shouldLoginFromPost()_ test case for an example.\n--\n\n.pom.xml\n[source,xml]\n----\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ede.ahus1.keycloak.dropwizard\u003c/groupId\u003e\n    \u003cartifactId\u003ekeycloak-dropwizard\u003c/artifactId\u003e\n    \u003cversion\u003ex.x.x\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n----\n\nThe most recent development version (based on the _master_ branch on GitHub) is available from the Sonatype OSS Snapshot Repository. To use it, include the following repository in your _pom.xml_.\n\n.pom.xml\n[source,xml]\n----\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003esnapshots-repo\u003c/id\u003e\n        \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n        \u003creleases\u003e\u003cenabled\u003efalse\u003c/enabled\u003e\u003c/releases\u003e\n        \u003csnapshots\u003e\u003cenabled\u003etrue\u003c/enabled\u003e\u003c/snapshots\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n----\n\n=== Prerequisites\n\nThese examples need a local Keycloak instance with Realm `test` and user `demo` with password `demo`.\n\nDownload the Keycloak distribution matching your keycloak-dropwizard-integration version from http://keycloak.org and extract it to a subfolder `keycloak-server` of this directory.\nThen call `keycloak-server.bat` to import an already configured realm. Using this startup file the configuration will be reset every time you start Keycloak.\n\n=== Parts\n\nThese examples will guide you through setting up Dropwizard and Keycloak in several configurations:\n\n* JAX-RS stateful server sessions +\nsee https://github.com/ahus1/keycloak-dropwizard-integration/tree/master/keycloak-dropwizard-jaxrs-example[module keycloak-dropwizard-jaxrs-example^].\n\n* Bearer-Only REST services for Dropwizard +\nsee https://github.com/ahus1/keycloak-dropwizard-integration/tree/master/keycloak-dropwizard-ajax-example[module keycloak-dropwizard-ajax-example^].\n\n=== License\n\nCopyright 2015-2023 Alexander Schwartz and the individual contributors.\n\nLicensed under the Apache License, Version 2.0 (the \"`License`\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"`AS IS`\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahus1%2Fkeycloak-dropwizard-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahus1%2Fkeycloak-dropwizard-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahus1%2Fkeycloak-dropwizard-integration/lists"}