-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Ldap] form_login_ldap and new authentication system #42346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The ldap authenticator decorates the form_login one, hence it should not extend it. |
…-dev, chalasr) This PR was merged into the 5.3 branch. Discussion ---------- [Ldap][Security] Make LdapAuthenticator an EntryPoint | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #42346 | License | MIT | Doc PR | N/A I added `@chalasr`'s recommandations given in #42346 (comment) Commits ------- 4daad9e Fix decorating non-entrypoint authenticators 0b0c15c [Ldap] Make LdapAuthenticator an EntryPoint
…-dev, chalasr) This PR was merged into the 5.3 branch. Discussion ---------- [Ldap][Security] Make LdapAuthenticator an EntryPoint | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #42346 | License | MIT | Doc PR | N/A I added `@chalasr`'s recommandations given in symfony/symfony#42346 (comment) Commits ------- 4daad9e784 Fix decorating non-entrypoint authenticators 0b0c15c019 [Ldap] Make LdapAuthenticator an EntryPoint
Symfony version(s) affected: 5.1+
Description
With the new authenticator manager enabled, the form_login_ldap authenticator doesn't take care of the login_path option
How to reproduce
/protected
/login
If you try to add:
You'll get a
ServiceNotFoundException
, which suggest to switch toentry_point: security.authenticator.form_login_ldap.main
which leads to a new issue:Possible Solution
Make
Symfony\Component\Ldap\Security\LdapAuthenticator
extends ofAbstractLoginFormAuthenticator
.This way we got a
getLoginUrl()
methods which resolve our main issue.The problem is that, unlike the
Symfony\Component\Security\Http\Authenticator
, we don't have theHttpUtils
service which prevents us to properly resolve thelogin_path
optionI'm not sure on how to inject properly the service to the authenticator so this is why I'm opening an issue instead of doing a MR
The text was updated successfully, but these errors were encountered: