Inheritance: implements Overtrue\Socialite\ProviderInterface
 public function __construct(Request $request, OpenPlatform $openPlatform, Config $config)
 {
     parent::__construct($request, $config->get('app_id'), $config->get('app_secret'), $config->get('redirect_url'));
     $session = new Session();
     $request->setSession($session);
     $this->stateless = true;
     $this->request = $request;
     $this->openPlatform = $openPlatform;
     $this->config = $config;
 }
コード例 #2
0
 /**
  * Get the Post fields for the token request.
  *
  * @param string $code
  *
  * @return array
  */
 protected function getTokenFields($code)
 {
     return parent::getTokenFields($code) + ['grant_type' => 'authorization_code'];
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 protected function getCodeFields($state = null)
 {
     $fields = parent::getCodeFields($state);
     if ($this->popup) {
         $fields['display'] = 'popup';
     }
     return $fields;
 }
コード例 #4
0
ファイル: QQProvider.php プロジェクト: overtrue/socialite
 /**
  * Get the access token from the token response body.
  *
  * @param string $body
  *
  * @return \Overtrue\Socialite\AccessToken
  */
 public function parseAccessToken($body)
 {
     parse_str($body, $token);
     return parent::parseAccessToken($token);
 }