mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33: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,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
|
||||
|
Loading…
Reference in New Issue
Block a user