ruby-jwe icon indicating copy to clipboard operation
ruby-jwe copied to clipboard

use together with JWT

Open dowi opened this issue 7 years ago • 2 comments

Hi and thanks a lot

How to use this gem as a container to a JWT (e.g created with ruby-jwt)? Should the JWT output of the ruby-jwt be the payload for the encrypt function?

Thanks a lot

dowi avatar Feb 14 '18 21:02 dowi

Hi @dowi, just as with any other medium, it's safer to sign first and use the result as the encryption payload, which is exactly what you suggest.

@excpt is way more well informed than me about the specs, he may have a better proposal ;)

francescobbo avatar Apr 15 '18 20:04 francescobbo

Furthermore it would be great that there is a way to include cty: 'JWT' as specified by: https://www.rfc-editor.org/rfc/rfc7519.html#section-5.2

itay-grudev avatar Aug 02 '22 13:08 itay-grudev