/**
  * Save the tokens to the registry
  */
 public function connectResponseAction()
 {
     $oAuthTokens = $this->sessionStorageAdapter->read('dropboxTokens');
     $this->dropbox->getOAuth()->setToken($oAuthTokens);
     $oAuthTokens = $this->dropbox->getOAuth()->getAccessToken();
     if (is_array($oAuthTokens)) {
         $this->registry->set('tx_dlDropbox', 'oauth_tokens', $oAuthTokens);
         $this->view->assign('successfullyAuthenticated', true);
     }
 }
Esempio n. 2
0
 /**
  * action show
  *
  * @return void
  */
 public function showAction()
 {
     /** It seems dropbox ignores the callBackUrl parameters, so the  default controller / action is called */
     if ($this->sessionStorageAdapter->read('dropBoxConnectInProgress')) {
         $this->sessionStorageAdapter->delete('dropBoxConnectInProgress');
         $this->forward('connectResponse', 'OAuth');
     }
     $syncs = $this->syncConfigurationRepository->findAll();
     $this->view->assign('syncs', $syncs);
     $this->view->assign('isAuthenticated', $this->dropbox->isAuthenticated());
 }
 /**
  * Read the session data into the cache.
  */
 protected function readFromSession()
 {
     $this->sessionData = $this->sessionAdapter->read('pt_extbase.cached.session');
 }