- edited description
Access to encoded JWS when processing JWE?
Hello!
Just a quick question: Would it be possible to get access to encoded representation of JWS when processing JWEs with JwtConsumer?
In my case, the decryption and signature verification works great, there is no problem there. However, I would
like to get access to encoded representation of the JWS (from JwtContext), but can't see decent way to do that.
After processing the context actually contains two JoseObjects:
- JsonWebSignature
- JsonWebEncryption
The JsonWebSignature object would have what I am looking for in rawCompactSerialization field,
but it is not public and there is no accessor to it.
I believe there is a similar way in other library (com.nimbusds.jose) where you could just: jweObject.getPayload().toSignedJWT()
Comments (6)
-
reporter -
reporter - marked as minor
- edited description
-
repo owner calling
getPayload()
on theJsonWebEncryption
object should give you exactly that. With a nested JWT that is signed and then encrypted, the plaintext payload of the JWE is the JWS.
-
reporter Your suggestion indeed solves my problem. Thank you for the superquick reply!
-
reporter - changed status to resolved
-
repo owner Glad I could help
- Log in to comment