endpoints: add GitLab DeviceAuthURL · golang/oauth2@b52af7d (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit b52af7d
endpoints: add GitLab DeviceAuthURL
See GitLab documentation https://docs.gitlab.com/ee/api/oauth2.html#device-authorization-grant-flow. Change-Id: Ideffbfcb67e0b25251a0b18148e57eab43124d37 GitHub-Last-Rev: 6ecd45eGitHub-Pull-Request: #733Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/600095TryBot-Result: Gopher Robot gobot@golang.org Run-TryBot: Matt Hickford matt.hickford@gmail.com Reviewed-by: Matt Hickford matt.hickford@gmail.com Reviewed-by: Michael Knyszek mknyszek@google.com Reviewed-by: David Chase drchase@google.com TryBot-Bypass: Matt Hickford matt.hickford@gmail.com LUCI-TryBot-Result: Go LUCI golang-scoped@luci-project-accounts.iam.gserviceaccount.com
File tree
2 files changed
lines changed
2 files changed
lines changed
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -62,8 +62,9 @@ var GitHub = oauth2.Endpoint{ | ||
62 | 62 | |
63 | 63 | // GitLab is the endpoint for GitLab. |
64 | 64 | var GitLab = oauth2.Endpoint{ |
65 | -AuthURL: "https://gitlab.com/oauth/authorize", | |
66 | -TokenURL: "https://gitlab.com/oauth/token", | |
65 | +AuthURL: "https://gitlab.com/oauth/authorize", | |
66 | +TokenURL: "https://gitlab.com/oauth/token", | |
67 | +DeviceAuthURL: "https://gitlab.com/oauth/authorize\_device", | |
67 | 68 | } |
68 | 69 | |
69 | 70 | // Google is the endpoint for Google. |
Lines changed: 2 additions & 5 deletions
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -6,11 +6,8 @@ | ||
6 | 6 | package gitlab // import "golang.org/x/oauth2/gitlab" |
7 | 7 | |
8 | 8 | import ( |
9 | -"golang.org/x/oauth2" | |
9 | +"golang.org/x/oauth2/endpoints" | |
10 | 10 | ) |
11 | 11 | |
12 | 12 | // Endpoint is GitLab's OAuth 2.0 endpoint. |
13 | -var Endpoint = oauth2.Endpoint{ | |
14 | -AuthURL: "https://gitlab.com/oauth/authorize", | |
15 | -TokenURL: "https://gitlab.com/oauth/token", | |
16 | -} | |
13 | +var Endpoint = endpoints.GitLab |