-
Notifications
You must be signed in to change notification settings - Fork 928
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ThomasK33
merged 1 commit into
main
from
thomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package
Jul 3, 2025
Merged
refactor: move OAuth2 provider code to dedicated package #18746
ThomasK33
merged 1 commit into
main
from
thomask33/07-03-refactor_oauth2_restructure_oauth2_provider_into_modular_package
Jul 3, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jul 3, 2025
74ada5e
to
94f8522
Compare
johnstcn
approved these changes
Jul 3, 2025
665993d
to
5d752e3
Compare
94f8522
to
c160ba6
Compare
5d752e3
to
e8b598e
Compare
c160ba6
to
912fd87
Compare
e8b598e
to
d7cac75
Compare
912fd87
to
a2737b7
Compare
d7cac75
to
cb75f3a
Compare
a2737b7
to
865dc56
Compare
f62413e
to
9965337
Compare
865dc56
to
1f89b53
Compare
1f89b53
to
db0f2a0
Compare
9965337
to
7fbb3ce
Compare
- 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 regressions This refactoring improves code organization and maintainability while preserving complete API compatibility. Change-Id: Ieef7cf3683ec93667f09a0d4894190a1e1a0b16e Signed-off-by: Thomas Kosiewski <[email protected]>
db0f2a0
to
a586976
Compare
Merge activity
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor OAuth2 Provider Code into Dedicated Package
This PR refactors the OAuth2 provider functionality by moving it from the main
coderd
package into a dedicatedoauth2provider
package. The change improves code organization and maintainability without changing functionality.Key changes:
oauth2provider
package to house all OAuth2 provider-related codecoderd/identityprovider
to the new packagehttp.HandlerFunc
instead of being handlers directlyapp_secrets.go
- Manages OAuth2 application secretsapps.go
- Handles OAuth2 application CRUD operationsauthorize.go
- Implements the authorization flowmetadata.go
- Provides OAuth2 metadata endpointsregistration.go
- Handles dynamic client registrationrevoke.go
- Implements token revocationsecrets.go
- Manages secret generation and validationtokens.go
- Handles token issuance and validationThis refactoring improves code organization and makes the OAuth2 provider functionality more maintainable while preserving all existing behavior.