mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-08 10:34:34 +00:00
Merge pull request #1512 from aztech-dev/oauth-2
Fix undefined method call
This commit is contained in:
@@ -603,9 +603,12 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
'state' => null,
|
||||
];
|
||||
|
||||
$result = [];
|
||||
|
||||
if ($params['state'] !== null) {
|
||||
$result["query"]["state"] = $params['state'];
|
||||
}
|
||||
|
||||
if ($is_authorized === false) {
|
||||
$result["query"]["error"] = OAUTH2_ERROR_USER_DENIED;
|
||||
} else {
|
||||
@@ -617,6 +620,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
$result["fragment"] = $this->createAccessToken($params['account_id'], $params['scope']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->doRedirectUriCallback($params['redirect_uri'], $result);
|
||||
}
|
||||
|
||||
@@ -820,7 +824,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
|
||||
return [
|
||||
'redirect_uri' => $this->client->getRedirectUri(),
|
||||
'client_id' => $this->client->getClient(),
|
||||
'client_id' => $this->client->getClientId(),
|
||||
'account_id' => $account->getId(),
|
||||
];
|
||||
} catch (AccountLockedException $e) {
|
||||
|
Reference in New Issue
Block a user