Commit 3ce16c5
committed
Consolidate OAuth2 provider resources into a single class
Replace the per-provider class hierarchy (OAuth2Provider base +
StandardProvider/WithEndpointProvider + ~40 one-line subclasses) with a
single OAuth2Provider class driven by a `providerKey => non-secret fields`
map. Addresses review feedback to have one class for all providers.
- Source dispatch: drop the 42-entry class registry + oauth2ClassFor();
build providers via OAuth2Provider::fromArray($key, $payload).
- Destination dispatch: replace the instanceof chain with a key check
(Apple) + data-driven settings routing for endpoint/tenant/prompt.
- The field map doubles as a secret allow-list: only declared non-secret
fields are copied off the listOAuth2Providers payload, so a future
upstream secret field cannot leak into the migration.
Net 44 fewer files. Pint, PHPStan level 3, and the Unit suite all pass.1 parent 6e4e416 commit 3ce16c5
47 files changed
Lines changed: 175 additions & 898 deletions
File tree
- src/Migration
- Destinations
- Resources/Auth/OAuth2
- Sources
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 48 | | |
52 | | - | |
53 | | - | |
54 | 49 | | |
55 | 50 | | |
56 | 51 | | |
| |||
3568 | 3563 | | |
3569 | 3564 | | |
3570 | 3565 | | |
3571 | | - | |
| 3566 | + | |
3572 | 3567 | | |
3573 | 3568 | | |
3574 | 3569 | | |
3575 | | - | |
3576 | | - | |
3577 | | - | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
3578 | 3575 | | |
3579 | 3576 | | |
3580 | 3577 | | |
3581 | | - | |
3582 | | - | |
| 3578 | + | |
| 3579 | + | |
3583 | 3580 | | |
3584 | | - | |
3585 | | - | |
3586 | | - | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
3587 | 3585 | | |
3588 | 3586 | | |
3589 | | - | |
3590 | | - | |
3591 | | - | |
3592 | | - | |
3593 | | - | |
3594 | | - | |
3595 | | - | |
3596 | | - | |
3597 | | - | |
3598 | | - | |
3599 | | - | |
3600 | | - | |
3601 | | - | |
3602 | | - | |
3603 | | - | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
3604 | 3595 | | |
3605 | 3596 | | |
3606 | 3597 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments