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

refactor: move OAuth2 provider code to dedicated package#18746

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

Conversation

ThomasK33
Copy link
Member

Refactor OAuth2 Provider Code into Dedicated Package

This PR refactors the OAuth2 provider functionality by moving it from the maincoderd package into a dedicatedoauth2provider package. The change improves code organization and maintainability without changing functionality.

Key changes:

  • Created a newoauth2provider package to house all OAuth2 provider-related code
  • Moved existing OAuth2 provider functionality fromcoderd/identityprovider to the new package
  • Refactored handler functions to follow a consistent pattern of returninghttp.HandlerFunc instead of being handlers directly
  • Split large files into smaller, more focused files organized by functionality:
    • app_secrets.go - Manages OAuth2 application secrets
    • apps.go - Handles OAuth2 application CRUD operations
    • authorize.go - Implements the authorization flow
    • metadata.go - Provides OAuth2 metadata endpoints
    • registration.go - Handles dynamic client registration
    • revoke.go - Implements token revocation
    • secrets.go - Manages secret generation and validation
    • tokens.go - Handles token issuance and validation

This refactoring improves code organization and makes the OAuth2 provider functionality more maintainable while preserving all existing behavior.

This was referencedJul 3, 2025
@ThomasK33Graphite App
Copy link
MemberAuthor

ThomasK33 commentedJul 3, 2025
edited
Loading

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ThomasK33ThomasK33 marked this pull request as ready for reviewJuly 3, 2025 15:01
@ThomasK33ThomasK33force-pushed thethomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branch from74ada5e to94f8522CompareJuly 3, 2025 15:16
@ThomasK33ThomasK33force-pushed thethomask33/07-02-feat_mcp_add_experiment_control_for_mcp_server_http_endpoints branch from665993d to5d752e3CompareJuly 3, 2025 16:36
@ThomasK33ThomasK33force-pushed thethomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branch from94f8522 toc160ba6CompareJuly 3, 2025 16:37
@ThomasK33ThomasK33force-pushed thethomask33/07-02-feat_mcp_add_experiment_control_for_mcp_server_http_endpoints branch from5d752e3 toe8b598eCompareJuly 3, 2025 16:53
@ThomasK33ThomasK33force-pushed thethomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branch fromc160ba6 to912fd87CompareJuly 3, 2025 16:53
@ThomasK33ThomasK33force-pushed thethomask33/07-02-feat_mcp_add_experiment_control_for_mcp_server_http_endpoints branch frome8b598e tod7cac75CompareJuly 3, 2025 17:14
@ThomasK33ThomasK33force-pushed thethomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branch from912fd87 toa2737b7CompareJuly 3, 2025 17:15
@ThomasK33ThomasK33force-pushed thethomask33/07-02-feat_mcp_add_experiment_control_for_mcp_server_http_endpoints branch fromd7cac75 tocb75f3aCompareJuly 3, 2025 17:28
@ThomasK33ThomasK33force-pushed thethomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branch froma2737b7 to865dc56CompareJuly 3, 2025 17:29
@ThomasK33ThomasK33force-pushed thethomask33/07-02-feat_mcp_add_experiment_control_for_mcp_server_http_endpoints branch 2 times, most recently fromf62413e to9965337CompareJuly 3, 2025 17:45
@ThomasK33ThomasK33force-pushed thethomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branch from865dc56 to1f89b53CompareJuly 3, 2025 17:45
@ThomasK33ThomasK33 changed the base branch fromthomask33/07-02-feat_mcp_add_experiment_control_for_mcp_server_http_endpoints tographite-base/18746July 3, 2025 18:09
@ThomasK33ThomasK33force-pushed thethomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branch from1f89b53 todb0f2a0CompareJuly 3, 2025 18:09
@ThomasK33ThomasK33 changed the base branch fromgraphite-base/18746 tomainJuly 3, 2025 18:09
- Rename identityprovider package to oauth2provider for clarity- Extract OAuth2 business logic from coderd/oauth2.go into focused modules:  - apps.go: OAuth2 app management (CRUD operations)  - app_secrets.go: OAuth2 app secrets management  - metadata.go: OAuth2 server and resource metadata endpoints  - registration.go: RFC 7591/7592 dynamic client registration- Update route handlers to delegate to oauth2provider functions- Preserve all existing API endpoints and Swagger documentation- Fix compilation issues and update middleware references- All tests passing with zero regressionsThis refactoring improves code organization and maintainability whilepreserving complete API compatibility.Change-Id: Ieef7cf3683ec93667f09a0d4894190a1e1a0b16eSigned-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33ThomasK33force-pushed thethomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branch fromdb0f2a0 toa586976CompareJuly 3, 2025 18:10
@ThomasK33ThomasK33 merged commitc650133 intomainJul 3, 2025
30 checks passed
@ThomasK33Graphite App
Copy link
MemberAuthor

Merge activity

@ThomasK33ThomasK33 deleted the thomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package branchJuly 3, 2025 18:24
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 3, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@ThomasK33ThomasK33

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ThomasK33@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp