-
Notifications
You must be signed in to change notification settings - Fork 376
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
Verifications not functioning in latest release #128
Comments
Haha, after trying to reproduce the issue outside the app I'm not seeing it. Sorry for the false alarm. |
As it turns out there was a change. The verification routines still work but only when all keys in the options hash are symbols, previously both symbol and string keys worked. require 'jwt'
key = 'superSekretK3yz!'
config = {
'iss' => 'foo'
}
payload = {
foo: 'bar',
}
token = JWT.encode(config.merge(payload), key)
decoded = JWT.decode(token, key, true, {'iss' => 'other', 'verify_iss' => true}) # succeeds
decoded = JWT.decode(token, key, true, {'iss' => 'other', verify_iss: true}) # succeeds
decoded = JWT.decode(token, key, true, {iss: 'other', 'verify_iss' => true}) # succeeds
decoded = JWT.decode(token, key, true, {iss: 'other', verify_iss: true}) # fails to decode Edit: Edited to add additional information and modify the repro script. |
Looks using the above as the basis of a good/bad script for |
Thanks for the feedback and your investigation results. |
After updating an app to
1.5.2
we're seeing some test failures due to exceptions not being raised when issuer, audience, and subject claims are mismatched. I'll investigate further and add info as I find it.The text was updated successfully, but these errors were encountered: