mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-24 04:22:07 +05:30
Throw an exception if a grant can't be loaded when called in getGrantType
This commit is contained in:
parent
3ac6690ac9
commit
a561a9d98a
@ -430,9 +430,13 @@ class AuthServer
|
|||||||
*/
|
*/
|
||||||
public function getGrantType($grantType)
|
public function getGrantType($grantType)
|
||||||
{
|
{
|
||||||
|
if (isset($this->grantTypes[$grantType])) {
|
||||||
return $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
|
* Get a parameter from passed input parameters or the Request class
|
||||||
* @param string|array $param Required parameter
|
* @param string|array $param Required parameter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user