mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-23 05:29:52 +05:30
Little fixes
This commit is contained in:
parent
f049997f59
commit
5c463a69b8
@ -327,7 +327,6 @@ class Server
|
|||||||
{
|
{
|
||||||
$params = array();
|
$params = array();
|
||||||
|
|
||||||
// Grant type (must be 'authorization_code')
|
|
||||||
if ( ! isset($authParams['grant_type']) && ! isset($_POST['grant_type'])) {
|
if ( ! isset($authParams['grant_type']) && ! isset($_POST['grant_type'])) {
|
||||||
|
|
||||||
throw new OAuthServerClientException(sprintf($this->errors['invalid_request'], 'grant_type'), 0);
|
throw new OAuthServerClientException(sprintf($this->errors['invalid_request'], 'grant_type'), 0);
|
||||||
@ -336,7 +335,7 @@ class Server
|
|||||||
|
|
||||||
$params['grant_type'] = (isset($authParams['grant_type'])) ? $authParams['grant_type'] : $_POST['grant_type'];
|
$params['grant_type'] = (isset($authParams['grant_type'])) ? $authParams['grant_type'] : $_POST['grant_type'];
|
||||||
|
|
||||||
// Ensure response type is one that is recognised
|
// Ensure grant type is one that is recognised
|
||||||
if ( ! in_array($params['grant_type'], $this->grant_types)) {
|
if ( ! in_array($params['grant_type'], $this->grant_types)) {
|
||||||
|
|
||||||
throw new OAuthServerClientException($this->errors['unsupported_grant_type'], 7);
|
throw new OAuthServerClientException($this->errors['unsupported_grant_type'], 7);
|
||||||
|
Loading…
Reference in New Issue
Block a user