Skip to content

Segregate the methods of the AuthenticationMethodInterface#114

Open
klsoft-web wants to merge 1 commit into
yiisoft:masterfrom
klsoft-web:authentication-method-interfaces-segregation
Open

Segregate the methods of the AuthenticationMethodInterface#114
klsoft-web wants to merge 1 commit into
yiisoft:masterfrom
klsoft-web:authentication-method-interfaces-segregation

Conversation

@klsoft-web

Copy link
Copy Markdown
Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues #113

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 09f2c628-f7bc-4a3c-8242-0998701aeb53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.26%. Comparing base (4e5fe12) to head (53c8509).

Files with missing lines Patch % Lines
src/Middleware/Authentication.php 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #114      +/-   ##
============================================
- Coverage     95.87%   95.26%   -0.62%     
+ Complexity       77       76       -1     
============================================
  Files            10       10              
  Lines           194      190       -4     
============================================
- Hits            186      181       -5     
- Misses            8        9       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samdark samdark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, in params.php

auth/config/params.php

Lines 14 to 16 in 53c8509

'trackedServices' => [
AuthenticationMethodInterface::class => [AuthenticationMethodInterfaceProxy::class, IdentityCollector::class],
],
It uses an old interface, which is fine if we stick to the backwards compatible way of doing things, but won't work for new stuff.

Comment on lines 32 to +35
public function __construct(
private AuthenticationMethodInterface $authenticationMethod,
ResponseFactoryInterface $responseFactory,
?RequestHandlerInterface $authenticationFailureHandler = null,
) {
$this->failureHandler = $authenticationFailureHandler ?? new AuthenticationFailureHandler(
$responseFactory,
);
}
private AuthenticatorInterface $authenticator,
private RequestHandlerInterface $authenticationFailureHandler,
) {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a backward compatibility break.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's exactly the same code that was approved for the issue. Has something changed?

Comment thread src/Method/HttpBasic.php
* ```
*/
final class HttpBasic implements AuthenticationMethodInterface
final class HttpBasic implements AuthenticatorInterface, ChallengeInterface

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be capped for this release.

Comment thread src/Method/Composite.php
* Composite allows multiple authentication methods at the same time.
*/
final class Composite implements AuthenticationMethodInterface
final class Composite implements AuthenticatorInterface, ChallengeInterface

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be kept for this release.

Comment thread src/Method/HttpCookie.php
* @see https://tools.ietf.org/html/rfc6265
*/
final class HttpCookie implements AuthenticationMethodInterface
final class HttpCookie implements AuthenticatorInterface

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be kept for this release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants