by gregmac · 3y ago · 0 comments
They're all made of base64url-encodes segments, separated by a period. The first segment is always the header, and you can easily identify them by starting with "eyJh".
A plain JWT has two segments, the second is the payload. In practice AFAIK it's not really used because it's just bloating your data.
JWS has a third segment that's the signature of the payload plus private key, and can be verified if you have the public key. JWT.io is a site where you can play with these.
JWE has five segments including an encrypted symmetric key, the IV and ciphertext.
So yeah, JWE is technically a different subtype. I'll only note you can stick an already-encrypted payload in a plain JWT or a JWS, and you can also take a JWT or JWS and encrypt it, and none of these is the same as actual JWE token.
No comments yet.