mirror of
https://github.com/bitinflow/accounts.git
synced 2026-03-13 13:35:52 +00:00
Update Provider.php
This commit is contained in:
@@ -22,7 +22,7 @@ class Provider extends AbstractProvider implements ProviderInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $scopes = [Scope::READ_USER];
|
protected $scopes = [Scope::USER_READ];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inherticdoc}.
|
* {@inherticdoc}.
|
||||||
@@ -53,14 +53,14 @@ class Provider extends AbstractProvider implements ProviderInterface
|
|||||||
protected function getUserByToken($token)
|
protected function getUserByToken($token)
|
||||||
{
|
{
|
||||||
$response = $this->getHttpClient()->get(
|
$response = $this->getHttpClient()->get(
|
||||||
'https://accounts.bitinflow.com/api/user', [
|
'https://accounts.bitinflow.com/api/v3/user', [
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'Accept' => 'application/json',
|
'Accept' => 'application/json',
|
||||||
'Authorization' => 'Bearer ' . $token,
|
'Authorization' => 'Bearer ' . $token,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return json_decode($response->getBody()->getContents(), true);
|
return json_decode($response->getBody()->getContents(), true)->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user