예제 #1
0
 /**
  * finish login step
  */
 function loginFinish()
 {
     // check that the CSRF state token is the same as the one provided
     $this->checkState();
     // call the parent function
     parent::loginFinish();
 }
예제 #2
0
 /**
  * finish login step 
  */
 function loginFinish()
 {
     parent::loginFinish();
     $this->user->profile->emailVerified = $this->user->profile->email;
     // restore the user profile
     Hybrid_Auth::storage()->set("hauth_session.{$this->providerId}.user", $this->user);
 }
예제 #3
0
 /**
  * finish login step
  */
 function loginFinish()
 {
     // check that the CSRF state token is the same as the one provided
     $session_var_name = 'state_' . $this->api->client_id;
     if (isset($_SESSION[$session_var_name])) {
         $state = $_SESSION[$session_var_name];
     }
     if (!isset($state) || !isset($_REQUEST['state']) || $state !== $_REQUEST['state']) {
         throw new Exception('Authentication failed! CSRF state token does not match the one provided.');
     }
     unset($_SESSION[$session_var_name]);
     // call the parent function
     parent::loginFinish();
 }
예제 #4
0
 function loginFinish()
 {
     if (isset($_REQUEST['access_token'])) {
         $token = $_REQUEST;
         $this->access_token = $token;
         // we should have an access_token unless something has gone wrong
         if (!isset($token["access_token"])) {
             throw new Exception("Authentication failed! {$this->providerId} returned an invalid access token.", 5);
         }
         $this->token('access_token', $token['access_token']);
         // set user as logged in to the current provider
         $this->setUserConnected();
         return;
     }
     parent::loginFinish();
 }