I'm migrating my ZF2 app to ZF3.
While calling the authenticate method, getting this exception
An error occurred An error occurred during execution; please try again later. No Exception available
This is how I' calling the method,
public function __construct($authService, $sessionManager, $config)
{
$this->authService = $authService;//Getting the Zend\Authentication\AuthenticationService object (no error here)
$this->sessionManager = $sessionManager;
$this->config = $config;
}
public function login($email, $password, $rememberMe)
{
if ($this->authService->getIdentity() != null) {
throw new \Exception('Already logged in');
}
// Authenticate with login/password.
$authAdapter = $this->authService->getAdapter();
$authAdapter->setEmail($email);//abc.gmail.com
$authAdapter->setPassword($password);//sha1 password
$this->authService->authenticate();//Exception is generating here
}
What is I'm doing wrong?