I’m trying to develop a webservice in a symfony based application, we are using a sfguarduser plugin, and i want to get user credentials authenticated in a single shot request to check user permissions and then execute webservice action, is there any way to perform login action without html form login?
Share
In your action do the following:
Which you must call with an object of sfGuardUser. You could put this code in a preExecute() method of the module, to check on each request.
I did something similar when I was doing an “activate account” action. An email with a token is sent after account creating, it contains a link back to the site. A token is sent in the URL and matched in the route to the action. The action then checks if a user has that token and then logs the user in. This is what I did:
Hope it helps.