src/Providers/DoubanProvider.php 1 location
|
@@ 80-87 (lines=8) @@
|
| 77 |
|
/** |
| 78 |
|
* {@inheritdoc}. |
| 79 |
|
*/ |
| 80 |
|
public function getAccessToken($code) |
| 81 |
|
{ |
| 82 |
|
$response = $this->getHttpClient()->post($this->getTokenUrl(), [ |
| 83 |
|
'form_params' => $this->getTokenFields($code), |
| 84 |
|
]); |
| 85 |
|
|
| 86 |
|
return $this->parseAccessToken($response->getBody()->getContents()); |
| 87 |
|
} |
| 88 |
|
} |
| 89 |
|
|
src/Providers/FacebookProvider.php 1 location
|
@@ 83-90 (lines=8) @@
|
| 80 |
|
* |
| 81 |
|
* @return \Overtrue\Socialite\AccessToken |
| 82 |
|
*/ |
| 83 |
|
public function getAccessToken($code) |
| 84 |
|
{ |
| 85 |
|
$response = $this->getHttpClient()->get($this->getTokenUrl(), [ |
| 86 |
|
'query' => $this->getTokenFields($code), |
| 87 |
|
]); |
| 88 |
|
|
| 89 |
|
return $this->parseAccessToken($response->getBody()); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
/** |
| 93 |
|
* {@inheritdoc} |
src/Providers/QQProvider.php 1 location
|
@@ 108-115 (lines=8) @@
|
| 105 |
|
* |
| 106 |
|
* @return \Overtrue\Socialite\AccessToken |
| 107 |
|
*/ |
| 108 |
|
public function getAccessToken($code) |
| 109 |
|
{ |
| 110 |
|
$response = $this->getHttpClient()->get($this->getTokenUrl(), [ |
| 111 |
|
'query' => $this->getTokenFields($code), |
| 112 |
|
]); |
| 113 |
|
|
| 114 |
|
return $this->parseAccessToken($response->getBody()->getContents()); |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
/** |
| 118 |
|
* Get the access token from the token response body. |
src/Providers/WeChatProvider.php 1 location
|
@@ 167-174 (lines=8) @@
|
| 164 |
|
/** |
| 165 |
|
* {@inheritdoc}. |
| 166 |
|
*/ |
| 167 |
|
public function getAccessToken($code) |
| 168 |
|
{ |
| 169 |
|
$response = $this->getHttpClient()->get($this->getTokenUrl(), [ |
| 170 |
|
'query' => $this->getTokenFields($code), |
| 171 |
|
]); |
| 172 |
|
|
| 173 |
|
return $this->parseAccessToken($response->getBody()->getContents()); |
| 174 |
|
} |
| 175 |
|
|
| 176 |
|
/** |
| 177 |
|
* Detect wechat open platform. |