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

feat: add OAuth2 client credentials grant type and user ownership#18841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ThomasK33 wants to merge1 commit intothomask33/07-10-feat_add_cleanup_for_expired_oauth2_provider_app_codes_and_tokens
base:thomask33/07-10-feat_add_cleanup_for_expired_oauth2_provider_app_codes_and_tokens
Choose a base branch
Loading
fromthomask33/07-12-feat_oauth2_add_client_credentials_grant_type_and_user_ownership
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletionscoderd/apidoc/docs.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

39 changes: 36 additions & 3 deletionscoderd/apidoc/swagger.json
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

1 change: 1 addition & 0 deletionscoderd/database/dbgen/dbgen.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1206,6 +1206,7 @@ func OAuth2ProviderApp(t testing.TB, db database.Store, seed database.OAuth2Prov
RedirectUris: takeFirstSlice(seed.RedirectUris, []string{"http://localhost"}),
ClientType: takeFirst(seed.ClientType, sql.NullString{String: "confidential", Valid: true}),
DynamicallyRegistered: takeFirst(seed.DynamicallyRegistered, sql.NullBool{Bool: false, Valid: true}),
UserID: takeFirst(seed.UserID, uuid.NullUUID{Valid: false}),
ClientIDIssuedAt: takeFirst(seed.ClientIDIssuedAt, sql.NullTime{}),
ClientSecretExpiresAt: takeFirst(seed.ClientSecretExpiresAt, sql.NullTime{}),
GrantTypes: takeFirstSlice(seed.GrantTypes, []string{"authorization_code", "refresh_token"}),
Expand Down
6 changes: 5 additions & 1 deletioncoderd/database/dump.sql
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

1 change: 1 addition & 0 deletionscoderd/database/foreign_key_constraint.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
-- Restore refresh_hash as NOT NULL (existing data should still be valid)
ALTER TABLE oauth2_provider_app_tokens
ALTER COLUMN refresh_hash SET NOT NULL;

-- Remove user_id column from OAuth2 provider apps
ALTER TABLE oauth2_provider_apps
DROP COLUMN user_id;
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
-- Add user ownership to OAuth2 provider apps for client credentials support
ALTER TABLE oauth2_provider_apps
ADD COLUMN user_id uuid REFERENCES users(id) ON DELETE CASCADE;

-- Make refresh_hash nullable to support client credentials tokens
-- RFC 6749 Section 4.4.3: "A refresh token SHOULD NOT be included" for client credentials
ALTER TABLE oauth2_provider_app_tokens
ALTER COLUMN refresh_hash DROP NOT NULL;
1 change: 1 addition & 0 deletionscoderd/database/models.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp