Esempio n. 1
0
 function processAdapterLoginFinish()
 {
     $this->_authInit();
     $provider_id = trim(strip_tags($this->request["hauth_done"]));
     $adapterFactory = new AdapterFactory($this->storage->config("CONFIG"), $this->storage);
     $adapter = $adapterFactory->setup($provider_id);
     if (!$adapter) {
         header("HTTP/1.0 404 Not Found");
         die("Invalid parameter! Please return to the login page and try again.");
     }
     try {
         $adapter->loginFinish();
     } catch (Exception $e) {
         $this->storage->set("error.status", 1);
         $this->storage->set("error.message", $e->getMessage());
         $this->storage->set("error.code", $e->getCode());
         $this->storage->set("error.exception", $e);
     }
     $this->_returnToCallbackUrl($provider_id);
 }
Esempio n. 2
0
 /**
  * Return the adapter instance for an authenticated provider
  */
 function getAdapter($providerId = null)
 {
     $adapterFactory = new AdapterFactory($this->config, $this->storage);
     return $adapterFactory->setup($providerId);
 }