Device Authorisation Grant Flow Quickstart#747
Device Authorisation Grant Flow Quickstart#747uzmamansoor09 wants to merge 3 commits intokeycloak:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new device Maven module intended to demonstrate Keycloak’s OAuth 2.0 Device Authorization Grant (Device Flow) using Spring Boot + Thymeleaf.
Changes:
- Registers a new
devicemodule in the root Maven reactor. - Introduces a Spring Boot web app skeleton (controller/service + Thymeleaf templates) and DTOs for device authorization responses.
- Adds a Keycloak realm import and module-level README/configuration.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Adds the new device module to the multi-module build. |
| device/pom.xml | New module POM with Spring Boot dependencies and build plugin configuration. |
| device/src/main/java/org/keycloak/quickstarts/DeviceApplication.java | Spring Boot entrypoint for the new module. |
| device/src/main/java/org/keycloak/quickstarts/DeviceController.java | MVC endpoints to start device flow and (intended) token display/logout. |
| device/src/main/java/org/keycloak/quickstarts/DeviceFlowService.java | RestClient-based call to Keycloak device authorization endpoint and state handling. |
| device/src/main/java/org/keycloak/quickstarts/DeviceResponse.java | DTO for device authorization response JSON. |
| device/src/main/java/org/keycloak/quickstarts/TokenResponse.java | DTO for token endpoint response JSON. |
| device/src/main/resources/templates/index.html | Start page with “Log in” action to initiate device flow. |
| device/src/main/resources/templates/device-info.html | Displays verification URI and user code. |
| device/src/main/resources/application.properties | Basic app config (name/port/Thymeleaf cache). |
| device/config/realm-import.json | Keycloak realm/client/user configuration for the device flow. |
| device/README.md | Usage instructions and conceptual overview for the quickstart. |
| device/.DS_Store | macOS metadata file added to repo (should not be committed). |
| .DS_Store | macOS metadata file added to repo root (should not be committed). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0ee41d7 to
575d15f
Compare
Signed-off-by: uzmamansoor09 <Uzma.Mansoor@ibm.com>
0a09228 to
e0aa822
Compare
Signed-off-by: uzmamansoor09 <Uzma.Mansoor@ibm.com>
Signed-off-by: uzmamansoor09 <Uzma.Mansoor@ibm.com>
rmartinc
left a comment
There was a problem hiding this comment.
Thanks @uzmamansoor09! Looks very good. Just one request. The quickstarts run the CI when doing the pull like in the main keycloak repo, I prefer to run the device in its specific job (that's why I asked you to remove the module in the pom.xml) . Can you please add the new device folder in the CI?
For example, you can use something similar to what I have done in this commit b1713ad. You can check the tests pass OK in your branch (actions tab in github).
|
|
||
| <modules> | ||
| <module>misc</module> | ||
| <module>device</module> |
There was a problem hiding this comment.
Remove this line. It's not needed now that the tests are run in the specific device job.
Closes #733, #734, #735, #736, #737, #738
Adding device 1 and device 2 implementation for the device authorisation grant flow quickstart