Merge pull request #72 from TomHAnderson/custom-grants
Grant namespace for verifying instance was improperly referenced1.0
commit
bb6cee5f60
|
@ -6,6 +6,7 @@ use Guzzle\Service\Client as GuzzleClient;
|
|||
use League\OAuth2\Client\Token\AccessToken as AccessToken;
|
||||
use League\OAuth2\Client\Token\Authorize as AuthorizeToken;
|
||||
use League\OAuth2\Client\Exception\IDPException as IDPException;
|
||||
use League\OAuth2\Client\Grant\GrantInterface;
|
||||
|
||||
abstract class IdentityProvider
|
||||
{
|
||||
|
@ -92,7 +93,7 @@ abstract class IdentityProvider
|
|||
throw new \InvalidArgumentException('Unknown grant "'.$grant.'"');
|
||||
}
|
||||
$grant = new $grant;
|
||||
} elseif ( ! $grant instanceof Grant\GrantInterface) {
|
||||
} elseif ( ! $grant instanceof GrantInterface) {
|
||||
throw new \InvalidArgumentException($grant.' is not an instance of League\OAuth2\Client\Grant\GrantInterface');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue