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

oauth2: support device flow #609

Closed
wants to merge 1 commit into from
Closed

Conversation

hickford
Copy link
Contributor

@hickford hickford commented Nov 14, 2022

Device Authorization Grant following RFC 8628 https://datatracker.ietf.org/doc/html/rfc8628

Tested with GitHub

Fixes #418

Fixes golang/go#58126

Co-authored-by: cmP [email protected]

@gopherbot
Copy link
Contributor

This PR (HEAD: bc6a2d2) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 6c5e40d) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

somersf added a commit to somersf/oauth2 that referenced this pull request Nov 21, 2022
Pull from upstream's PR golang#609, and merge into local branch so
I can push to my fork.
somersf added a commit to somersf/go-oidc that referenced this pull request Nov 21, 2022
OAuth2 golang/oauth2#609 adds support for
Device Code authorization flow.  As part of that change, it adds
DeviceCodeURL to the Provider and ProviderConfig structs.

This change adds support for populating the new field from
device_authorization_endpoint obtained from the well-known endpoint.
Copy link

@dave-tucker dave-tucker left a comment

Choose a reason for hiding this comment

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

I came here looking to contribute a Device Flow impl and was happy to see it was already in progress! Thanks to all those that have contributed to this 🙏
I've added a couple of comments from the implementation I've done which I think are relevant here.
Very much looking forward to seeing this merged!

oauth2.go Outdated Show resolved Hide resolved
oauth2.go Outdated Show resolved Hide resolved
@hickford hickford force-pushed the device-flow branch 2 times, most recently from 0f38476 to 549316c Compare December 30, 2022 02:19
@gopherbot
Copy link
Contributor

This PR (HEAD: 549316c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 2a9d404) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 9: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 9:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 9: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Frank Somers:

Patch Set 9:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 8c7208a) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@hickford hickford marked this pull request as ready for review March 5, 2023 22:32
@gopherbot
Copy link
Contributor

This PR (HEAD: fa1978c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@hickford hickford marked this pull request as draft March 5, 2023 22:41
@gopherbot
Copy link
Contributor

This PR (HEAD: c0aa320) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 02610a4) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: b825c25) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: ccad9d9) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/450155 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 19: Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 27: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 27:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 27: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 79f7325) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/oauth2/+/450155.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Jorropo:

Patch Set 28: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 28:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 28: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 28: Commit-Queue+1 Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 28: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 28:

CV cannot start a Run for [email protected] because the user is neither the CL owner nor a committer.


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 28:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Bryan Mills:

Patch Set 28:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Bryan Mills:

Patch Set 28: Code-Review+1

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 28:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 9a126d7) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/oauth2/+/450155.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 29:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 29: Commit-Queue+1 Run-TryBot+1

Copied votes on follow-up patch sets have been updated:

  • Commit-Queue+1 has been copied to patch set 30 (copy condition: "changekind:NO_CODE_CHANGE").
  • Run-TryBot+1 has been copied to patch set 30 (copy condition: "changekind:NO_CODE_CHANGE").

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Matt Hickford:

Patch Set 30: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 30:

CV cannot start a Run for [email protected] because the user is neither the CL owner nor a committer.


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 30: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 30:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 30: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Than McIntosh:

Patch Set 30: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/450155.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Sep 6, 2023
Device Authorization Grant following RFC 8628 https://datatracker.ietf.org/doc/html/rfc8628

Tested with GitHub

Fixes #418

Fixes golang/go#58126

Co-authored-by: cmP <[email protected]>

Change-Id: Id588867110c6a5289bf1026da5d7ead88f9c7d14
GitHub-Last-Rev: 9a126d7
GitHub-Pull-Request: #609
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/450155
Commit-Queue: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Than McIntosh <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
Run-TryBot: Matt Hickford <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/450155 has been merged.

@gopherbot gopherbot closed this Sep 6, 2023
jbrichetto pushed a commit to openly-engineering/oauth2 that referenced this pull request May 22, 2024
Device Authorization Grant following RFC 8628 https://datatracker.ietf.org/doc/html/rfc8628

Tested with GitHub

Fixes golang#418

Fixes golang/go#58126

Co-authored-by: cmP <[email protected]>

Change-Id: Id588867110c6a5289bf1026da5d7ead88f9c7d14
GitHub-Last-Rev: 9a126d7
GitHub-Pull-Request: golang#609
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/450155
Commit-Queue: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Than McIntosh <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
Run-TryBot: Matt Hickford <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
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.

x/oauth2: Device authorization grant Support OAuth2 Device Flow
3 participants