-
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
TypeError: no implicit conversion of String into Integer #188
Comments
The And by the official page of the JWT RFC is here: https://tools.ietf.org/html/rfc7519 JWT.io is a website provided by Auth0, a company that provides a service that is focused around JWT and authentication. |
This broke in version |
I have a similar problem. The cause is in the implementation of The thing is, patch version upgrades shouldn't really break backwards compatibility. If there is no critical reason why JSON.generate is used instead of MultiJson.encode, maybe it could be put back in next version? |
This is caused by line 30 in raise InvalidPayload, 'exp claim must be an integer' if payload && payload['exp'] && payload['exp'].is_a?(Time) If Encode.base64url_encode(JSON.generate(payload)) does accept an array.
|
I had some problems handling this library concerning insert an array into
JWT.encode
, suposing I have a JSON in array format. Testing on padrino IRB, I got this error:I have tested the command
jwt = JWT.encode([{"id"=>1}],'!chave','HS256')
an it raised. What is the best way to handle this error? In the official web page of JWT is possible to convert directly from JSON array to JWT, so why I can't deal with this gem just like that?The text was updated successfully, but these errors were encountered: