I have the problem that the authentification session doesn't expire , this is my code of authentification :
$adapter = $this->getServiceLocator()->get('doctrine.authenticationadapter.orm_default');
$adapter->setOptions(array(
'objectManager' => $this->getEntityManager(),
'identityClass' => 'Application\Entity\User',
'identityProperty' => 'email',
'credentialProperty' => 'password'));
$adapter->setIdentityValue($mail);
$adapter->setCredentialValue($password);
$authService = new AuthenticationService();
$result = $authService->authenticate($adapter);
if ($result->isValid())
{
$identity = $result->getIdentity();
$authService->getStorage()->write($identity);
echo "valide";
}
else
echo "invalide";
Thanks.