Example #1
0
 /**
  * 
  * @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());
 }
Example #3
0
 public function __construct($request) {
     $this->request = $request;
     $this->application = PCModelManager::fetchObjectWithIdentifier(PCModelApplication::getMapper(), PCModelApplication::WEBSITE_APP_ID, NULL, TRUE);
     $this->setupSession();
 }