Update Provider.php

This commit is contained in:
2022-10-02 22:12:46 +02:00
committed by GitHub
parent 95b8559b01
commit f8439f81e9

View File

@@ -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;
} }
/** /**