We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc3394b commit 043004fCopy full SHA for 043004f
coderd/httpmw/apikey_test.go
@@ -530,10 +530,13 @@ func TestAPIKey(t *testing.T) {
530
)
531
r.Header.Set(codersdk.SessionTokenHeader, token)
532
533
- oauthToken := &oauth2.Token{
534
- AccessToken: "wow",
535
- RefreshToken: "moo",
536
- Expiry: dbtime.Now().AddDate(0, 0, 1),
+ // Include a valid oauth token for refreshing. If this token is invalid,
+ // it is difficult to tell an auth failure from a expired api key, or
+ // an expired oauth key.
+ oauthToken := &oauth2.Token{
537
+ AccessToken: "wow",
538
+ RefreshToken: "moo",
539
+ Expiry: dbtime.Now().AddDate(0, 0, 1),
540
}
541
httpmw.ExtractAPIKeyMW(httpmw.ExtractAPIKeyConfig{
542
DB: db,
0 commit comments