1
votes

What opensource Java library can be used to parse/decrypt JWT token in JWE JSON serialization format as below enter image description here

I was looking at nimbus-jose (https://connect2id.com/products/nimbus-jose-jwt/) but I cannot find any releavnt example. I want to use some open source library which will require little coding and will support different encryption algorithms out-of-the-box.

1

1 Answers

1
votes

Unfortunately the JSON Serialization modes are often missing from implementations. This is mainly due to the fact that this mode is rarely used as not URL safe.

It is possible to convert JWE from that mode to the compact mode, but only if there is no aad and header members which is not the case here.

I see only few possibilities to solve your problem:

  • Ask developers to implement that feature (can be long).
  • Develop your own implementation (not so easy).
  • Find an implementation in another language that supports that format (e.g. in PHP).