I have been looking for a solution on the Internet for my configuration, but I cannot find one that suits my needs. So far I have been working on this for 3 full days, and I can’t get it to work correctly, I’m sure there are a few things that I don’t understand.
I am developing a symfony application on branch 2.1.
Make it short. I have a web service that I want to use for authentication.
This is the thread I want to implement:
- User Submits Credentials
- These credentials (username and password) are sent to my web service
- If the username / password is correct, the web service provides an array with the username, roles and some other things besides the password. (if the credentials are incorrect, an array with one field will be returned)
- As soon as the web service provides a "large" array, I want the user to be considered authenticated.
- In the role role function, I want the Symfony security component to grant the user the appropriate permission.
- I would like to avoid having to call the web service for every page you view.
I don’t know if this can be done using Symfony, for sure this workflow seems no more secure, but I don’t see another way to use this web service.
, UserProvider, . , -, Symfony ( ).
: , , $username loadUserByUsername() UserProvider ( UserProviderInterface)? , , .