コード例 #1
0
ファイル: Endpoint.php プロジェクト: artoodetoo/auth-sandbox
 private function processAuthDone($providerId)
 {
     $adapterFactory = new AdapterFactory($this->config, $this->storage);
     $adapter = $adapterFactory->setup($providerId);
     if (!$adapter) {
         $adapter->setUserUnconnected();
         Util::error404('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);
         $adapter->setUserUnconnected();
     }
     $this->returnToCallbackUrl($providerId);
 }