Little fixes

This commit is contained in:
Alex Bilbie 2012-08-01 14:50:31 +01:00
parent f049997f59
commit 5c463a69b8

View File

@ -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);