Example #1
0
 /**
  * (non-PHPdoc)
  * @see \Socialite\Bridge\Provider\BaseProvider::getAccessToken()
  */
 public function getAccessToken($verifier)
 {
     $url = $this->getNormalizedUrl($this->oauth_access_token_url);
     // build the oauth request parameters
     $params = array('code' => $verifier, 'redirect_uri' => $this->getCallback(), 'grant_type' => 'authorization_code');
     // create the request object
     $request = new OAuthRequest($url, $params, OAuthClient::HTTP_POST);
     $request->setVersion($this->oauth_version);
     $request->setConsumer($this->consumer);
     // execute the request
     $client = new OAuthClient($request);
     $client->execute();
     // store the response
     $this->response = $client->getResponse();
 }
Example #2
0
 /**
  * (non-PHPdoc)
  * @see \Socialite\Bridge\Provider\BaseProvider::getAccessToken()
  */
 public function getAccessToken($verifier)
 {
     $url = $this->getNormalizedUrl($this->oauth_access_token_url);
     // build the oauth request parameters
     $params = array('oauth_verifier' => $verifier);
     // create the request object
     $request = new OAuthRequest($url, $params, OAuthClient::HTTP_POST);
     $request->setConsumer($this->consumer);
     $request->setToken($this->token);
     $request->setVersion($this->oauth_version);
     // execute the request
     $client = new OAuthClient($request);
     $client->execute();
     // store the response
     $this->response = $client->getResponse();
 }