Je migre mon application ZF2 vers ZF3.Exception lors de l'appel de la méthode d'authentification du service d'authentification Zend
Tout en appelant la méthode d'authentification, obtenir cette exception
Une erreur est survenue Une erreur est survenue lors de l'exécution; Veuillez réessayer plus tard. Aucune exception disponible
Voici comment j'appeler la méthode,
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
}
Qu'est-ce que je fais mal?
Dites-nous quelque chose de plus sur le service d'authentification. Cela vient-il du module externe? Ou c'est la classe Zend standard? – SzymonM
@SzymonM C'est une classe Zend standard. L'objet de 'Zend \ Authentication \ AuthenticationService' –