From 5c463a69b85a45046ae274c7ee4e80b46daf4b71 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Wed, 1 Aug 2012 14:50:31 +0100 Subject: [PATCH] Little fixes --- src/Oauth2/Authentication/Server.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Oauth2/Authentication/Server.php b/src/Oauth2/Authentication/Server.php index d074c5ad..a809bb08 100644 --- a/src/Oauth2/Authentication/Server.php +++ b/src/Oauth2/Authentication/Server.php @@ -327,7 +327,6 @@ class Server { $params = array(); - // Grant type (must be 'authorization_code') if ( ! isset($authParams['grant_type']) && ! isset($_POST['grant_type'])) { 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']; - // 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)) { throw new OAuthServerClientException($this->errors['unsupported_grant_type'], 7); @@ -349,7 +348,7 @@ class Server case 'authorization_code': // Authorization code grant return $this->completeAuthCodeGrant($authParams, $params); - break; + break; case 'refresh_token': // Refresh token case 'password': // Resource owner password credentials grant