Changing 'user_credentials' to password

This commit is contained in:
Daniel Horrigan 2013-01-07 10:31:28 -05:00
parent 2fecadd2a6
commit 89e89a73dc

View File

@ -48,7 +48,7 @@ class Server
*/
private $_grantTypes = array(
'authorization_code',
'user_credentials',
'password',
'refresh_token',
);
@ -379,7 +379,7 @@ class Server
return $this->completeAuthCodeGrant($authParams, $params);
break;
case 'user_credentials':
case 'password':
return $this->completeUserCredentialsGrant($authParams, $params);
break;
@ -542,7 +542,7 @@ class Server
$params = array();
if ( ! isset($authParams['user_auth_callback'])) {
throw new \InvalidArgumentException('You must set a user_auth_callback when using the user_credentials grant type.');
throw new \InvalidArgumentException('You must set a user_auth_callback when using the password grant type.');
}
// Client ID
@ -582,7 +582,7 @@ class Server
$params['grant_type'] = $_POST['grant_type'];
}
if ($params['grant_type'] == 'user_credentials')
if ($params['grant_type'] == 'password')
{
// Check if user's u+p are correct
$userId = call_user_func($authParams['user_auth_callback']);