Navigation Menu

Skip to content
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

iat can be a float value #134

Merged
merged 3 commits into from Mar 23, 2016
Merged

iat can be a float value #134

merged 3 commits into from Mar 23, 2016

Conversation

llimllib
Copy link
Contributor

  1. The iat attribute can be a float or an integer. The spec says:

The "iat" (issued at) claim identifies the time at which the JWT was
issued. This claim can be used to determine the age of the JWT. Its
value MUST be a number containing a NumericDate value. Use of this
claim is OPTIONAL.

Where a NumericDate is defined as:

NumericDate
A JSON numeric value representing the number of seconds from
1970-01-01T00:00:00Z UTC until the specified UTC date/time,
ignoring leap seconds. This is equivalent to the IEEE Std 1003.1,
2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in
which each day is accounted for by exactly 86400 seconds, other
than that non-integer values can be represented. See RFC 3339
[RFC3339] for details regarding date/times in general and UTC in
particular.

which explicitly allows for non-integer values.

  1. Is there anything else that needs doing for float iat to work? I couldn't find anything but I took a very shallow look.

ruby decodes json integers into integer types, so don't assume
that they're floats
@llimllib llimllib changed the title iat should be a float value iat can be a float value Mar 11, 2016
@excpt excpt merged commit 502eed7 into jwt:master Mar 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants