Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5603be8

Browse files
committed
PR feedback
1 parent822b677 commit5603be8

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

‎coderd/database/db2sdk/db2sdk.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ func OAuth2ProviderApp(accessURL *url.URL, dbApp database.OAuth2ProviderApp) cod
383383
}).String(),
384384
// We do not currently support DeviceAuth.
385385
DeviceAuth:"",
386+
TokenRevoke:accessURL.ResolveReference(&url.URL{
387+
Path:"/oauth2/revoke",
388+
}).String(),
386389
},
387390
}
388391
}

‎coderd/oauth2provider/revoke.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ func revokeAPIKeyInTx(ctx context.Context, db database.Store, token string, appI
161161
iferr!=nil {
162162
iferrors.Is(err,sql.ErrNoRows) {
163163
// API key not found - return success per RFC 7009 (don't reveal token existence)
164-
// Note: This covers both non-existent keys and invalid key ID formats
165164
returnnil
166165
}
167166
returnxerrors.Errorf("get api key by id: %w",err)
@@ -175,7 +174,7 @@ func revokeAPIKeyInTx(ctx context.Context, db database.Store, token string, appI
175174

176175
// Verify the API key was created by OAuth2
177176
ifapiKey.LoginType!=database.LoginTypeOAuth2ProviderApp {
178-
returnxerrors.New("API key is not anOAuth2 token")
177+
returnxerrors.New("api key is not anoauth2 token")
179178
}
180179

181180
// Find the associated OAuth2 token to verify ownership

‎codersdk/oauth2.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type OAuth2ProviderApp struct {
2727
typeOAuth2AppEndpointsstruct {
2828
Authorizationstring`json:"authorization"`
2929
Tokenstring`json:"token"`
30+
TokenRevokestring`json:"token_revoke"`
3031
// DeviceAuth is optional.
3132
DeviceAuthstring`json:"device_authorization"`
3233
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp