public function decode(string $token, bool $ignoreExceptions = false): ?array
    {
        try {
            $payload = FirebaseJWT::decode($token, $this->publicKey, [self::ALGO]);

            return json_decode(json_encode($payload), true);
        } catch (Exception $exception) {
            $this->exceptionHandler($exception, $ignoreExceptions);

            return null;
        }
    }
public function decode(string $token, bool $ignoreExceptions = false): ?array
    {
        try {
            $payload = FirebaseJWT::decode($token, $this->publicKey, [self::ALGO]);

            return json_decode(json_encode($payload), true);
        } catch (Exception $exception) {
            $this->exceptionHandler($exception, $ignoreExceptions);

            return null;
        }
    }
public function decode ( string $ token , bool $ ignoreExceptions = false ) : ? array { try { $ payload = FirebaseJWT :: decode ( $ token , $ this -> publicKey , [ self :: ALGO ] ) ; return json_decode ( json_encode ( $ payload ) , true ) ; } catch ( Exception $ exception ) { $ this -> exceptionHandler ( $ exception , $ ignoreExceptions ) ; return null ; } }
Decode JWT Token using public key

@param string $token JWT Token as string
@param bool $ignoreExceptions If true will ignore any kind of exception and return null
@return array|null Returns payload as array or null if exceptions are ignored
@throws Exception
Decode JWT Token using public key