You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to get the "exp" or "iat" grant (created by other jwt libraries), NULL is returned. This is because those values are not stored as strings (and should not be stored as strings according to the spec.)
jwt_get_grant calls get_js_string which calls json_string_value
I made functions
jwt_get_grant_int which calls get_js_int which calls json_integer_value
Here's the JWT that I was parsing. I printed this via jwt_dump_str:
But I was unable to get the "exp" or "iat" values with jwt_get_grant. I think that jwt_set_grant will not be compliant for "exp" and "iat" values because it will set them as strings.
I have a branch if you'd like a pull request.
The text was updated successfully, but these errors were encountered:
Looks like there is a pull request to address this problem, but in a more broad way - to support JSON. Doesn't this seem like a critical piece? How else can you validate expiration dates of tokens (that were made as integers by other spec compliant libraries)? Last movement on that pull request was in April. Is this dead?
When I try to get the "exp" or "iat" grant (created by other jwt libraries), NULL is returned. This is because those values are not stored as strings (and should not be stored as strings according to the spec.)
jwt_get_grant
callsget_js_string
which callsjson_string_value
I made functions
jwt_get_grant_int
which callsget_js_int
which callsjson_integer_value
Here's the JWT that I was parsing. I printed this via
jwt_dump_str
:But I was unable to get the "exp" or "iat" values with
jwt_get_grant
. I think thatjwt_set_grant
will not be compliant for "exp" and "iat" values because it will set them as strings.I have a branch if you'd like a pull request.
The text was updated successfully, but these errors were encountered: