public function toString()
    {
        $date = new \DateTime('now');

        //Make sure we have an issue time
        if (!isset($this->_claims['iat'])) {
            $this->setIssueTime($date);
        }

        if (!isset($this->_claims['exp'])){
            $this->setExpireTime($date->modify('+24 hours'));
        }

        $header    = $this->_toBase64url($this->_toJson($this->_header));
        $payload   = $this->_toBase64url($this->_toJson($this->_claims));

        return sprintf("%s.%s", $header, $payload);
    }