diff --git a/src/Token/AccessToken.php b/src/Token/AccessToken.php index a268c20..c237687 100644 --- a/src/Token/AccessToken.php +++ b/src/Token/AccessToken.php @@ -5,6 +5,7 @@ use Firebase\JWT\JWT; use RuntimeException; use TheNetworg\OAuth2\Client\Provider\Azure; +use Exception; class AccessToken extends \League\OAuth2\Client\Token\AccessToken { @@ -39,7 +40,7 @@ public function __construct(array $options, $provider) // Then parse the idToken claims only without validating the signature $idTokenClaims = (array)JWT::jsonDecode(JWT::urlsafeB64Decode($tks[1])); } - } catch (JWT_Exception $e) { + } catch (Exception $e) { throw new RuntimeException('Unable to parse the id_token!'); }