code: def sign(self):
          
          payload = self._payload()
          sigin = b'.'.join([self.protected.encode('utf-8'), payload])
          signature = self.engine.sign(self.key, sigin)
          return {'protected': self.protected,
                  'payload': payload,
                  'signature': base64url_encode(signature)}
docs: Generates a signature