/** * * @param PCRequest $request * @param PCAuthCookiesAdapter $adapter */ public function __construct($request, $adapter = NULL) { parent::__construct($request); $this->adapter = ($adapter == NULL ? new PCAuthDefaultCookiesAdapter() : $adapter); $this->application = PCModelManager::fetchObjectWithIdentifier(PCModelApplication::getMapper(), PCModelApplication::WEBSITE_APP_ID, NULL, TRUE); $this->setupSession(); $this->authorize(); }
/** * * @param PCModelApplication $application */ public function doLogout($application) { session_destroy(); $response = PCResponse::currentResponse(); $response->addCookie(PCResponseCookie::expiredCookie("user")); $response->addCookie(PCResponseCookie::expiredCookie("presence_c")); PCMapperToken::removeTokenForUser($this->user_id, $application->getAppId()); }
public function __construct($request) { $this->request = $request; $this->application = PCModelManager::fetchObjectWithIdentifier(PCModelApplication::getMapper(), PCModelApplication::WEBSITE_APP_ID, NULL, TRUE); $this->setupSession(); }