public function validateJWT($jwt)
    {
        try {
            $decoded = $this->decode($jwt);
            return !empty($decoded);
        } catch (Exception $e) {
            //For simple true/false validation we don't throw exceptions;
            //just return false but store exception in case further
            //details are wanted
            $this->lastException = $e;
            return false;
        }
    }
public function validateJWT($jwt)
    {
        try {
            $decoded = $this->decode($jwt);
            return !empty($decoded);
        } catch (Exception $e) {
            //For simple true/false validation we don't throw exceptions;
            //just return false but store exception in case further
            //details are wanted
            $this->lastException = $e;
            return false;
        }
    }
public function validateJWT ( $ jwt ) { try { $ decoded = $ this -> decode ( $ jwt ) ; return ! empty ( $ decoded ) ; } catch ( Exception $ e ) { //For simple true/false validation we don't throw exceptions; //just return false but store exception in case further //details are wanted $ this -> lastException = $ e ; return false ; } }
Check if a JWT is valid

@param string $jwt JWT

@return bool true if $jwt is a valid JWT, false if not
Check if a JWT is valid