- Notifications
You must be signed in to change notification settings - Fork1k
Commitc650133
authored
refactor: move OAuth2 provider code to dedicated package (#18746)
# Refactor OAuth2 Provider Code into Dedicated PackageThis PR refactors the OAuth2 provider functionality by moving it from the main `coderd` package into a dedicated `oauth2provider` package. The change improves code organization and maintainability without changing functionality.Key changes:- Created a new `oauth2provider` package to house all OAuth2 provider-related code- Moved existing OAuth2 provider functionality from `coderd/identityprovider` to the new package- Refactored handler functions to follow a consistent pattern of returning `http.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 validationThis refactoring improves code organization and makes the OAuth2 provider functionality more maintainable while preserving all existing behavior.1 parent7fbb3ce commitc650133
File tree
17 files changed
+1095
-981
lines changed- coderd
- oauth2provider
- oauth2providertest
17 files changed
+1095
-981
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
| |||
913 | 914 |
| |
914 | 915 |
| |
915 | 916 |
| |
916 |
| - | |
| 917 | + | |
917 | 918 |
| |
918 |
| - | |
| 919 | + | |
919 | 920 |
| |
920 | 921 |
| |
921 | 922 |
| |
| |||
952 | 953 |
| |
953 | 954 |
| |
954 | 955 |
| |
955 |
| - | |
| 956 | + | |
956 | 957 |
| |
957 | 958 |
| |
958 | 959 |
| |
959 | 960 |
| |
960 | 961 |
| |
961 |
| - | |
| 962 | + | |
962 | 963 |
| |
963 |
| - | |
964 |
| - | |
965 |
| - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
966 | 967 |
| |
967 | 968 |
| |
968 | 969 |
| |
| |||
1479 | 1480 |
| |
1480 | 1481 |
| |
1481 | 1482 |
| |
1482 |
| - | |
1483 |
| - | |
| 1483 | + | |
| 1484 | + | |
1484 | 1485 |
| |
1485 | 1486 |
| |
1486 | 1487 |
| |
1487 |
| - | |
1488 |
| - | |
1489 |
| - | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
1490 | 1491 |
| |
1491 | 1492 |
| |
1492 |
| - | |
1493 |
| - | |
| 1493 | + | |
| 1494 | + | |
1494 | 1495 |
| |
1495 | 1496 |
| |
1496 | 1497 |
| |
1497 |
| - | |
| 1498 | + | |
1498 | 1499 |
| |
1499 | 1500 |
| |
1500 | 1501 |
| |
|
0 commit comments
Comments
(0)