Throw an exception if a grant can't be loaded when called in getGrantType

This commit is contained in:
Alex Bilbie 2013-05-06 13:57:46 -07:00
parent 3ac6690ac9
commit a561a9d98a

View File

@ -430,8 +430,12 @@ class AuthServer
*/
public function getGrantType($grantType)
{
return $this->grantTypes[$grantType];
}
if (isset($this->grantTypes[$grantType])) {
return $this->grantTypes[$grantType];
}
throw new Exception\InvalidGrantTypeException(sprintf(self::$exceptionMessages['unsupported_grant_type'], $grantType), 9);
}
/**
* Get a parameter from passed input parameters or the Request class