Improve interface segregation - #119
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 113-interface-segregation #119 +/- ##
============================================================
Coverage 95.93% 95.93%
Complexity 79 79
============================================================
Files 10 10
Lines 197 197
============================================================
Hits 189 189
Misses 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the authentication contracts to better separate “authenticate only” authenticators from authenticators that also add a failure challenge, and updates middleware/method implementations and docs accordingly.
Changes:
- Replace
ChallengeInterfaceusage with the newAuthenticatorWithChallengeInterfaceand update the middleware and composite method logic. - Update built-in authentication methods to declare the appropriate authenticator interfaces and document no-op challenges where applicable.
- Refresh README and changelog entries to reflect the new interface structure and deprecations.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Middleware/Authentication.php | Switches challenge behavior detection to AuthenticatorWithChallengeInterface. |
| src/Method/QueryParameter.php | Declares authenticator interface changes; documents no-op challenge for deprecated contract compatibility. |
| src/Method/HttpHeader.php | Declares authenticator interface changes; documents no-op challenge for deprecated contract compatibility. |
| src/Method/HttpCookie.php | Declares authenticator interface changes; documents no-op challenge for deprecated contract compatibility. |
| src/Method/HttpBearer.php | Updates interface declaration/imports to the new challenge-aware contract. |
| src/Method/HttpBasic.php | Updates interface declaration/imports to the new challenge-aware contract. |
| src/Method/Composite.php | Updates composite challenge handling to rely on AuthenticatorWithChallengeInterface. |
| src/ChallengeInterface.php | Removes the old challenge-only interface. |
| src/AuthenticatorWithChallengeInterface.php | Introduces a new interface for authenticators that also add challenges on failure. |
| src/AuthenticatorInterface.php | Updates docs to steer challenge-capable authenticators to the new interface. |
| src/AuthenticationMethodInterface.php | Re-defines deprecated interface as equivalent to AuthenticatorWithChallengeInterface. |
| README.md | Updates documentation to reference the new interfaces and deprecation guidance. |
| CHANGELOG.md | Notes the interface changes under the current development version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.