-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JWS to JWE usage with SymmetricKey #13
Comments
$decrypted = \SimpleJWT\JWE::decrypt($encrypted, $keys, 'PBES2-HS512+A256KW');
$decoded = \SimpleJWT\JWT::decode($decrypted, $keys, 'HS512'); |
Hi @kelvinmo, unfortunately, the output is the same either way. |
OK. I've looked at it again, and there is a bug in the code whereby it is inserting a $headers['kid'] = $key->getKeyId(); // comment out this line it should work |
Yes, it works, thanks a lot! Is this an easy fix for you? I'm not very familiar with JWT or your implementation so i'm not sure i could propose a correct PR. edit: Nevermind, Github didnt update with your fix when i wrote this, so i see it's already done and there was nothing else to take care of on top of removing the line :) |
I've got a PR prepared at #14. If it works I can merge it into master |
Hello,
First of all, thanks for this JWT library, it looks like to be the easiest one to use that also supports encryption.
I think i'm a bit confused as to how to create a JWE from a JWS though. I keep getting a
Key not found or is invalid
error when decrypting the JWE. Here's how i'm trying to do it :Am i missing something regarding keys usage ?
The text was updated successfully, but these errors were encountered: