-
Notifications
You must be signed in to change notification settings - Fork 133
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
RSA verification issues #44
Comments
Thanks @jurriaan for making this issue, have the same problem myself. Any news? |
It seems like the signin input is not being generated correctly -- let me have a look. |
Ok got it, you should use SimpleJWS when you generate the token, as its designed to auto add the iat claim on its own. Now, when you verify a token this becomes a problem since the iat gets added by default. You can workaround this issue by using: $jws = JWS::load($token);
$jws->isValid($public_key, 'RS256'); instead of |
Thanks for the quick feedback @odino but it looks like JWS does not have a isValid function. |
sorry, use |
Works like a charm, thanks! |
closing it |
It looks like this library doesn't accept valid JWTs signed with RSA.
This example shows how the JOSE and JWT libraries respond to a token I generated using ruby-jwt:
This results in the following output:
Somehow this library considers this token invalid. Why is that?
The text was updated successfully, but these errors were encountered: