Add provider-supplied request authentication#238
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #238 +/- ##
=========================================
Coverage 88.12% 88.13%
- Complexity 1213 1215 +2
=========================================
Files 60 60
Lines 3934 3937 +3
=========================================
+ Hits 3467 3470 +3
Misses 467 467
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
RequestAuthenticationInterfaceinstance.ProviderRegistryto use provider-supplied authentication before falling back to metadata/env-derived authentication.Fixes #237.
Testing
php -l src/Providers/Contracts/ProviderWithRequestAuthenticationInterface.php && php -l src/Providers/ProviderRegistry.php && php -l tests/mocks/MockCustomRequestAuthentication.php && php -l tests/mocks/MockCustomAuthProvider.php && php -l tests/mocks/MockCustomAuthModel.phpvendor/bin/phpunit tests/unit/Providers/ProviderRegistryTest.php --filter 'testRegisterProvider(Uses|Binds)ProviderSuppliedRequestAuthentication'composer phpcs && composer phpstancomposer testran all 1090 tests/assertions, but this local PHP 8.5 runtime reports 83 existing reflection tests as risky becauseReflectionMethod::setAccessible()/ReflectionProperty::setAccessible()now emit deprecations.AI assistance