0
votes

How can I make Symfony 2 user authentication using external user authentication service (UAS)?

Here is the plan:

  1. Enter Login and Password;
  2. Press Submit button;
  3. Symfony 2 send request to auth. service (Login and Password);
  4. Symfony 2 receives user status from auth. service (access/no access);
  5. User login with ROLE_USER without saving user data to database.

Any solutions for this?

1

1 Answers

2
votes

You need to write your custom authentication provider in Symfony to achieve something like that.

I already answered to the same topic here:
Symfony 2.4/FOSUserBundle - is there a way to hook into the login process programatically?

And here's the Symfony tutorial explaining and detailing a scenario:
http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html