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

Commit8c29819

Browse files
committed
feat(oauth2): add frontend UI for client credentials applications
- Add ClientCredentialsAppForm and ClientCredentialsAppRow components- Update API schemas to include created_at, grant_types, and user_id fields- Add dedicated pages for creating and managing client credentials apps- Update sidebar navigation and routing for OAuth2 client credentials- Enhance OAuth2AppPageView with user ownership information displayChange-Id: I3271c7fb995d7225dd6cc830066fa2c8cb29720aSigned-off-by: Thomas Kosiewski <tk@coder.com>
1 parentc654948 commit8c29819

File tree

19 files changed

+1218
-70
lines changed

19 files changed

+1218
-70
lines changed

‎coderd/apidoc/docs.go

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/db2sdk/db2sdk.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,19 @@ func TemplateVersionParameterOptionFromPreview(option *previewtypes.ParameterOpt
354354
}
355355

356356
funcOAuth2ProviderApp(accessURL*url.URL,dbApp database.OAuth2ProviderApp) codersdk.OAuth2ProviderApp {
357+
varuserID uuid.UUID
358+
ifdbApp.UserID.Valid {
359+
userID=dbApp.UserID.UUID
360+
}
361+
357362
return codersdk.OAuth2ProviderApp{
358363
ID:dbApp.ID,
359364
Name:dbApp.Name,
360365
RedirectURIs:dbApp.RedirectUris,
361366
Icon:dbApp.Icon,
367+
CreatedAt:dbApp.CreatedAt,
368+
GrantTypes:dbApp.GrantTypes,
369+
UserID:userID,
362370
Endpoints: codersdk.OAuth2AppEndpoints{
363371
Authorization:accessURL.ResolveReference(&url.URL{
364372
Path:"/oauth2/authorize",
@@ -369,6 +377,9 @@ func OAuth2ProviderApp(accessURL *url.URL, dbApp database.OAuth2ProviderApp) cod
369377
DeviceAuth:accessURL.ResolveReference(&url.URL{
370378
Path:"/oauth2/device/authorize",
371379
}).String(),
380+
Revocation:accessURL.ResolveReference(&url.URL{
381+
Path:"/oauth2/revoke",
382+
}).String(),
372383
},
373384
}
374385
}

‎codersdk/oauth2.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"net/http"
1010
"net/url"
1111
"strings"
12+
"time"
1213

1314
"github.com/google/uuid"
1415
"golang.org/x/oauth2"
@@ -25,6 +26,9 @@ type OAuth2ProviderApp struct {
2526
Namestring`json:"name"`
2627
RedirectURIs []string`json:"redirect_uris"`
2728
Iconstring`json:"icon"`
29+
CreatedAt time.Time`json:"created_at" format:"date-time"`
30+
GrantTypes []string`json:"grant_types"`
31+
UserID uuid.UUID`json:"user_id,omitempty" format:"uuid"`
2832

2933
// Endpoints are included in the app response for easier discovery. The OAuth2
3034
// spec does not have a defined place to find these (for comparison, OIDC has
@@ -186,6 +190,7 @@ type OAuth2ProviderAppSecretFull struct {
186190

187191
typeOAuth2ProviderAppSecretstruct {
188192
ID uuid.UUID`json:"id" format:"uuid"`
193+
CreatedAt time.Time`json:"created_at" format:"date-time"`
189194
LastUsedAtNullTime`json:"last_used_at"`
190195
ClientSecretTruncatedstring`json:"client_secret_truncated"`
191196
}

‎docs/reference/api/enterprise.md

Lines changed: 35 additions & 10 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/api/schemas.md

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/api/typesGenerated.ts

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp