Symfony2 authentication: how can I choose a service provider dynamically?

In the login form, the user will be allowed to select the company to which he belongs. Depending on what he chooses, it will be authenticated against database1 or database2 or LDAPserver1, etc.

I know that Symfony2 has a chain provider option, but I don’t want the application to loop on all providers and instead go directly to the corresponding server.

Basically, I want to dynamically select a provider.

How can I do this in symfony2?

Or what could be the best solution for this kind of authentication?

thanks

+5
source share
1 answer

Perhaps this is what you are looking for?

dynamic form modification

0
source

Source: https://habr.com/ru/post/1214451/


All Articles