I research on cookbook the chapter relative of security and the most near is the part How to Authenticate Users with API Keys. I'm not sure if is possible to login in synfony through URL. I try to develop a service that permit login and I want to use a URL like this:
mysite.com/login/user/password/token
Before to make the complete code I try to make a test and be sure thats works and I pass my var with value in the same code in controller:
$_username="user";
$_password="password";
$this->redirect($this->generateUrl('subscriber_login_check'));
if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) {
$error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR);
} else {
$error = $session->get(SecurityContext::AUTHENTICATION_ERROR);
$session->remove(SecurityContext::AUTHENTICATION_ERROR);
}
When I try to do this on controller I have the follow error :
Unable to find the controller for path "/login_check/". Maybe you forgot to add the matching route in your routing configuration?
I don't know if I need to so something else in others files or this is not possible to do it.
Thank you