src/Providers/BaiduProvider.php 1 location
|
@@ 101-113 (lines=13) @@
|
| 98 |
|
* |
| 99 |
|
* @return array |
| 100 |
|
*/ |
| 101 |
|
protected function getUserByToken(AccessTokenInterface $token) |
| 102 |
|
{ |
| 103 |
|
$response = $this->getHttpClient()->get($this->baseUrl . '/rest/' . $this->version . '/passport/users/getInfo', [ |
| 104 |
|
'query' => [ |
| 105 |
|
'access_token' => $token->getToken(), |
| 106 |
|
], |
| 107 |
|
'headers' => [ |
| 108 |
|
'Accept' => 'application/json', |
| 109 |
|
], |
| 110 |
|
]); |
| 111 |
|
|
| 112 |
|
return json_decode($response->getBody(), true); |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
/** |
| 116 |
|
* Map the raw user array to a Socialite User instance. |
src/Providers/WeiboProvider.php 1 location
|
@@ 94-107 (lines=14) @@
|
| 91 |
|
* |
| 92 |
|
* @return array |
| 93 |
|
*/ |
| 94 |
|
protected function getUserByToken(AccessTokenInterface $token) |
| 95 |
|
{ |
| 96 |
|
$response = $this->getHttpClient()->get($this->baseUrl.'/'.$this->version.'/users/show.json', [ |
| 97 |
|
'query' => [ |
| 98 |
|
'uid' => $token['uid'], |
| 99 |
|
'access_token' => $token->getToken(), |
| 100 |
|
], |
| 101 |
|
'headers' => [ |
| 102 |
|
'Accept' => 'application/json', |
| 103 |
|
], |
| 104 |
|
]); |
| 105 |
|
|
| 106 |
|
return json_decode($response->getBody(), true); |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
/** |
| 110 |
|
* Map the raw user array to a Socialite User instance. |