/** * Tries to authenticate the current request * * @return bool Returns if the authentication was successful */ public function authenticate() { return $this->sessionManager->valueForKey('loginStatus') === AuthHandler::STATUS_LOGGED_IN; }
/** * Log out * * @return array */ public function logout() { $this->sessionManager->setValueForKey('loginStatus', self::STATUS_LOGGED_OUT); return array('status' => self::STATUS_LOGGED_OUT); }