(self)
return jwt, expiry
Make a signed JWT.

        Returns:
            Tuple[bytes, datetime]: The encoded JWT and the expiration.
Make a signed JWT.
Make a signed JWT .
def _make_jwt(self):
        """Make a signed JWT.

        Returns:
            Tuple[bytes, datetime]: The encoded JWT and the expiration.
        """
        now = _helpers.utcnow()
        lifetime = datetime.timedelta(seconds=self._token_lifetime)
        expiry = now + lifetime

        payload = {
            "iss": self._issuer,
            "sub": self._subject,
            "iat": _helpers.datetime_to_secs(now),
            "exp": _helpers.datetime_to_secs(expiry),
        }
        if self._audience:
            payload["aud"] = self._audience

        payload.update(self._additional_claims)

        jwt = encode(self._signer, payload)

        return jwt, expiry
def _make_jwt ( self ) : now = _helpers . utcnow ( ) lifetime = datetime . timedelta ( seconds = self . _token_lifetime ) expiry = now + lifetime payload = { "iss" : self . _issuer , "sub" : self . _subject , "iat" : _helpers . datetime_to_secs ( now ) , "exp" : _helpers . datetime_to_secs ( expiry ) , } if self . _audience : payload [ "aud" ] = self . _audience payload . update ( self . _additional_claims ) jwt = encode ( self . _signer , payload ) return jwt , expiry