A signed JWT/JWS object can be additionally encrypted, thus providing integrity, authenticity, non-repudiation and confidentiality to data.
The JWT is signed with a private RSA or EC key.
The signed JWT then becomes the payload (plaintext) of a JWE object, which is encrypted with either the public key (RSA or EC) of the recipient, or with a secret key that has been shared between the two parties.
Processing a nested JWT works backwards:
The JWE object is decrypted with the appropriate key (private key for RSA or EC, or established secret key).
The extracted payload (plain text) is then parsed as a signed JWT, and verified with the issuer’s public key (RSA or EC).
https://www.linkedin.com/pulse/beneffits-jwtjwsjwe-api-designs-wagner-brunca/