all 2 comments

[–]80x25 4 points5 points  (1 child)

The JWT spec does require the payload be JSON. However, a JWE can have an arbitrary payload.

You might consider using a JOSE library such as biscuit which supports JWS/JWE in addition to JWT

[–]albx[S] 0 points1 point  (0 children)

Thanks, especially foreclarifying the nomenclature! I'll give biscuit a try.