/** * @inheritdoc */ public function authenticate() { $userData = 0; if ($this->sessionHandler->has(AuthenticationModel::AUTH_NAME)) { $userData = $this->sessionHandler->get(AuthenticationModel::AUTH_NAME, []); } elseif ($this->request->getCookies()->has(AuthenticationModel::AUTH_NAME)) { list($userId, $token) = explode('|', $this->request->getCookies()->get(AuthenticationModel::AUTH_NAME, '')); $userData = $this->verifyCredentials($userId, $token); } $this->authenticationModel->authenticate($userData); }