def to_jwt(self, key=None, algorithm="<STR_LIT>", lev=<NUM_LIT:0>, lifetime=<NUM_LIT:0>):
_jws = JWS(self.to_json(lev), alg=algorithm)<EOL>return _jws.sign_compact(key)<EOL>
Create a signed JWT representation of the class instance

:param key: The signing key
:param algorithm: The signature algorithm to use
:param lev:
:param lifetime: The lifetime of the JWS
:return: A signed JWT