Skip to content

Device 1 implementation #747

Draft
uzmamansoor09 wants to merge 1 commit intokeycloak:mainfrom
uzmamansoor09:735
Draft

Device 1 implementation #747
uzmamansoor09 wants to merge 1 commit intokeycloak:mainfrom
uzmamansoor09:735

Conversation

@uzmamansoor09
Copy link
Copy Markdown

Closes #735.
Adding device 1 implementation.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 device module 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.

Comment thread device/README.md
Comment thread device/src/main/java/org/keycloak/quickstarts/DeviceApplication.java Outdated
Comment thread device/src/main/java/org/keycloak/quickstart/DeviceFlowService.java
Comment thread device/pom.xml
Comment thread device/src/main/java/org/keycloak/quickstarts/DeviceController.java Outdated
Comment thread device/src/main/java/org/keycloak/quickstarts/DeviceApplication.java Outdated
Comment thread device/pom.xml Outdated
Comment thread device/pom.xml Outdated
Comment thread device/src/main/java/org/keycloak/quickstart/DeviceFlowService.java
Comment thread device/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Device 1

2 participants