docs: def from_jwt(self, txt, keyjar, verify=True, **kwargs):
          """
          Given a signed and/or encrypted JWT, verify its correctness and then
          create a class instance from the content.
  
          :param txt: The JWT
          :param key: keys that might be used to decrypt and/or verify the
              signature of the JWT
          :param verify: Whether the signature should be verified or not
          :param keyjar: A KeyJar that might contain the necessary key.
          :param kwargs: Extra key word arguments
          :return: A class instance
          """
  
          algarg = {}
          if 'encalg' in kwargs:
              algarg['alg'] = kwargs['encalg']
          if 'encenc' in kwargs:
              algarg['enc'] = kwargs['encenc']
          _decryptor = jwe_factory(txt, **algarg)
  
          if _decryptor:
              logger.debug("JWE headers: {}".format(_decryptor.jwt.headers))
  
              dkeys = keyjar.get_decrypt_key(owner="")
  
              logger.debug('Decrypt class: {}'.format(_decryptor.__class__))
              _res = _decryptor.decrypt(txt, dkeys)
              logger.debug('decrypted message:{}'.format(_res))
              if isinstance(_res, tuple):
                  txt = as_unicode(_res[0])
              elif isinstance(_res, list) and len(_res) == 2:
                  txt = as_unicode(_res[0])
              else:
                  txt = as_unicode(_res)
              self.jwe_header = _decryptor.jwt.headers
  
          try:
              _verifier = jws_factory(txt, alg=kwargs['sigalg'])
          except:
              _verifier = jws_factory(txt)
  
          if _verifier:
              try:
                  _jwt = _verifier.jwt
                  jso = _jwt.payload()
                  _header = _jwt.headers
  
                  key = []
  
                  # if "sender" in kwargs:
                  #     key.extend(keyjar.get_verify_key(owner=kwargs["sender"]))
  
                  logger.debug("Raw JSON: {}".format(jso))
                  logger.debug("JWS header: {}".format(_header))
                  if _header["alg"] == "none":
                      pass
                  elif verify:
                      if keyjar:
                          key.extend(keyjar.get_jwt_verify_keys(_jwt, **kwargs))
  
                      if "alg" in _header and _header["alg"] != "none":
                          if not key:
                              raise MissingSigningKey(
                                  "alg=%s" % _header["alg"])
  
                      logger.debug("Found signing key.")
                      try:
                          _verifier.verify_compact(txt, key)
                      except NoSuitableSigningKeys:
                          if keyjar:
                              update_keyjar(keyjar)
                              key = keyjar.get_jwt_verify_keys(_jwt, **kwargs)
                              _verifier.verify_compact(txt, key)
              except Exception:
                  raise
              else:
                  self.jws_header = _jwt.headers
          else:
              jso = json.loads(txt)
  
          self.jwt = txt
          return self.from_dict(jso)