Returns an encoded token for the given payload dictionary.

def encode(self, payload):
        """
        Returns an encoded token for the given payload dictionary.
        """
        token = jwt.encode(payload, self.signing_key, algorithm=self.algorithm)
        return token.decode('utf-8')