mirror of
https://github.com/bitinflow/accounts.git
synced 2026-03-13 13:35:52 +00:00
Fix oauth token generation
This commit is contained in:
@@ -24,8 +24,8 @@ trait OauthTrait
|
|||||||
public function retrievingToken(string $grantType, array $attributes): Result
|
public function retrievingToken(string $grantType, array $attributes): Result
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$response = $this->client->request('POST', '/oauth/token', $attributes + [
|
$response = $this->client->request('POST', '/oauth/token', [
|
||||||
'form_params' => [
|
'form_params' => $attributes + [
|
||||||
'grant_type' => $grantType,
|
'grant_type' => $grantType,
|
||||||
'client_id' => $this->getClientId(),
|
'client_id' => $this->getClientId(),
|
||||||
'client_secret' => $this->getClientSecret(),
|
'client_secret' => $this->getClientSecret(),
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ class ApiOauthTest extends ApiTestCase
|
|||||||
|
|
||||||
public function testGetOauthToken(): void
|
public function testGetOauthToken(): void
|
||||||
{
|
{
|
||||||
$this->getClient()->withClientId('5');
|
|
||||||
$this->getClient()->withClientSecret('jejmtAJJWeEesW1siWwojjLn6zW9AIcWH1wqfFPq');
|
|
||||||
$this->registerResult($result = $this->getClient()->retrievingToken('client_credentials', [
|
$this->registerResult($result = $this->getClient()->retrievingToken('client_credentials', [
|
||||||
'scope' => '',
|
'scope' => '',
|
||||||
]));
|
]));
|
||||||
|
|||||||
Reference in New Issue
Block a user