ruby-jwt icon indicating copy to clipboard operation
ruby-jwt copied to clipboard

Set default issued at time

Open derosm2 opened this issue 6 years ago • 2 comments

Seems like there should be consistency between the different JWT gems/packages. The node package will generate an iat by default, while this gem does not.

From node-jsonwebtoken

Generated jwts will include an iat (issued at) claim by default unless noTimestamp is specified.

derosm2 avatar Apr 29 '19 19:04 derosm2

I always thought of the standard as trying to make the token as small as possible by default. The claims are left for per-case basis and their usefullness highly depends on each partocilar use case.

The majority of my use cases didn't need to know the age or creation time of the token (iat) but the expiration time (some tokens were just exp value with a signature).

I personally don't like the idea to deviate from the standard just because other did that. Though it's up to the maintainers of the gem.

hesalx avatar Sep 10 '19 18:09 hesalx

I have the urge to close this issue. I feel that the library should not take any decisions on behalf of the users and assume everyone wants something optional.

anakinj avatar Sep 03 '22 19:09 anakinj