-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Cookbook article: Authenticating against an external API #2358
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
This is tricky. On the one hand, we need to check the password. The On the other hand, without an What would be the use cases of this cookbook article? |
I think we can and should handle this in #3357. Since I'm the one who opened this issue, I'm going to close it now and hope that we handle it well there. @romaricdrigon since you've been working on some security stuff, if you have some time to look at the implementation in #3357, I'd love your thoughts :). Cheers! |
Did it cover things like OpenID? I didn't found any cookbook entries which can help to do some types of authentication similar to the OpenID (redirect from login form and then check some credentials when user returned back to the login check route from extenal API). |
The closest thing to using an external API would be this article : http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html Basically this is this + handling redirection/responses in the firewall. Last time I had to implement such a thing, I looked a lot to similar OAuth or OpenID bundles. Also I'm not sure if there are no way to simplify this with 2.4+ Security component, at that time I had to use 2.3 LTS. However, I'm wondering if we should cover this in the documentation. I feel like it's pretty advanced and we would be going way further than the other articles. Implementing this requires understanding a lot of subsystems, and the debug during implementation is usually tricky. |
Is there still some interest for that cookbook entry? |
@romaricdrigon, Yes! I will be very grateful if you do it. |
1 similar comment
+1, still wondering how to do this... |
@romaricdrigon + 1 |
This is a question that comes up quite frequently: how to setup a custom authentication system where the username/password are checked in the background against an API. In this case, things in the normal flow like
UserProvider::loadUserByUsername
don't make sense.I think it may be useful to have a second cookbook entry (in addition to custom_authentication_provider, which talks about WSSE) for this use-case. The "custom-authentication" world is big and varied - if we added this, it would serve to cover more common, but difficult use cases.
The text was updated successfully, but these errors were encountered: