Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth RFC-8628 Device Code Grant Flow (deadline 2025-03-15) #4632

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

andrewfg
Copy link
Contributor

@andrewfg andrewfg commented Mar 5, 2025

This PR adds RFC-8628 Device Code Grant Flow support to the OH Core OAuth service.

Specifically it adds new RFC-8628 specific classes and extends the functionality of already existing OAuth services to add support for the new RFC-8628 Device Code Grant Flow functionality.

This PR is required by openhab/openhab-addons#18354 -- which has an implementation deadline of March 15th 2025.

image

Signed-off-by: Andrew Fiddian-Green [email protected]

Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg andrewfg requested a review from a team as a code owner March 5, 2025 14:46
@andrewfg andrewfg marked this pull request as draft March 5, 2025 14:47
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg
Copy link
Contributor Author

andrewfg commented Mar 5, 2025

@mherwege @jlaur .. apropos openhab/openhab-addons#18354

Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg added 9 commits March 5, 2025 17:25
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg
Copy link
Contributor Author

andrewfg commented Mar 9, 2025

@mherwege / @jlaur see my comment/question here openhab/openhab-addons#18354 (comment)

@andrewfg andrewfg marked this pull request as ready for review March 9, 2025 16:33
andrewfg added 4 commits March 9, 2025 16:37
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg
Copy link
Contributor Author

Just to confirm that this is ready for review.

@andrewfg andrewfg changed the title OAuth add RFC-8628 Device Code Grant Flow authentication OAuth RFC-8628 Device Code Grant Flow (deadline 2025-03-15) Mar 10, 2025
@andrewfg
Copy link
Contributor Author

@kritsel many thanks for pointing out the need for this.

Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg
Copy link
Contributor Author

PS I am working on some tweaks to respond to server error responses..

add support for response error exception, support slow down, fix log texts, throw fewer exceptions

Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg
Copy link
Contributor Author

@openhab/add-ons-maintainers in case you need evidence of successful testing .. please see work flow below..

1. Thing offline: click link to servlet

2025-03-12_13-04-23

2. Servlet: click link to authentication URL

2025-03-12_13-11-20

3. Enter User Id

2025-03-12_12-57-35

3. Enter credentials

2025-03-12_12-58-26

4. Credentials confirmed

2025-03-12_12-58-45

5. Thing online

2025-03-12_13-14-22

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Just one comment.

@andrewfg andrewfg changed the title OAuth RFC-8628 Device Code Grant Flow (deadline 2025-03-15) OAuth RFC-8628 Device Code Grant Flow Mar 12, 2025
@andrewfg andrewfg changed the title OAuth RFC-8628 Device Code Grant Flow OAuth RFC-8628 Device Code Grant Flow (deadline 2025-03-15) Mar 12, 2025
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.

2 participants