public function itCallsTheDriverForConnexion()
 {
     $openid_url = "https://www.google.com/accounts/o8/id";
     $return_to_url = "http://example.net";
     expect($this->driver)->connect($openid_url, $return_to_url)->once();
     $this->connexion_manager->startAuthentication($openid_url, $return_to_url);
 }
 public function finish_login()
 {
     try {
         $return_url = get_server_url() . '/my';
         if ($this->request->existAndNonEmpty('return_to')) {
             $return_url = $this->request->getValidated('return_to', 'string', '');
         }
         $driver = new Openid_Driver_ConnexionDriver($this->logger, '?func=' . OpenId_OpenIdRouter::FINISH_LOGIN);
         $connexion_manager = new Openid_ConnexionManager($driver);
         $identity_url = $connexion_manager->finishAuthentication($return_url);
         $this->account_manager->authenticateCorrespondingUser($identity_url);
         $this->response->redirect($return_url);
     } catch (OpenId_OpenIdException $exception) {
         $this->response->addFeedback(Feedback::ERROR, $exception->getMessage());
     }
     $this->response->redirect('/account/login');
 }