Search code examples
jwtfusionauth

How to generate the signed and encrypted JWT access token in FusionAuth


I am using FusionAuth. We have created one application in it. It is an OAuth application.

It generates the JWT access token. I copy the access token and past it in the https://jwt.io/ debugger and see that, it is able to decode the JWT token and I am able to see the payload of the JWT. As this JWT is only signed and not encrypted.

Here, I want to generate the JWT as encrypted, So how I can generate JWT access token as encrypted, So basically I want a Signed and encrypted JWT and how fusion will validate it if we find a way to generate the JWT in an encrypted way?

Thank you.


Solution

  • FusionAuth does not currently support JWT encryption, we only support signing using HMAC, RSA or EC algorithms.

    You could sign and encrypt a JWT outside of FusionAuth but FusionAuth will not be able to validate the signature.

    If this is something you'd like to see in FusionAuth please open a feature request on our GitHub issues repository.

    Thanks!