Repository navigation
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #17041 +/- ##
==========================================
- Coverage 49.73% 49.24% -0.50%
==========================================
Files 274 274
Lines 48948 48160 -788
==========================================
- Hits 24343 23715 -628
+ Misses 22230 22100 -130
+ Partials 2375 2345 -30 ☔ View full report in Codecov by Sentry. |
e288340 to
f9b1597
Compare
f9b1597 to
4335d9b
Compare
Signed-off-by: Diana Gaponcic <diana.gaponcic@cern.ch>
4335d9b to
22b7cb3
Compare
|
Could someone have a look at this one? |
| data.Set("grant_type", grant_type) | ||
| data.Set("device_code", deviceCodeResponseBody.DeviceCode) | ||
|
|
||
| tokenRequest, _ := http.NewRequest("POST", oidcSettings.TokenURL, strings.NewReader(data.Encode())) |
There was a problem hiding this comment.
Is there an error we should be handling here?
| return tokenString, refreshToken | ||
| } | ||
|
|
||
| func oauth2LoginBrowserless( |
There was a problem hiding this comment.
This is a pretty big function.... can it be broken down into smaller pieces, ideally things that can be unit-tested?
| httpClient := &http.Client{} | ||
| data := url.Values{} | ||
| data.Set("client_id", oauth2conf.ClientID) | ||
| deviceCodeRequest, _ := http.NewRequest("POST", oidcSettings.DeviceURL, strings.NewReader(data.Encode())) |
| _, cancel := context.WithTimeout(ctx, 1*time.Second) | ||
| defer cancel() |
There was a problem hiding this comment.
Can we do without this context? Looks unused.
|
Hi @crenshaw-dev |
|
closing this in favor of #29198 |
Closes: #16069
This PR updates the oauth2Login function to support multiple OAuth flows.
Instead of starting an HTTP server and opening a browser, a URL is printed on the screen that can be opened from elsewhere to finish the authorization process (as described in the rfc).
Checklist: