panva / paseto

PASETO (Platform-Agnostic SEcurity TOkens) for Node.js with no dependencies
MIT License
428 stars 26 forks source link

Fix the type of the `iat` field #5

Closed dborysov closed 4 years ago

dborysov commented 4 years ago

Fixing the type of the iat field: it should be string, not boolean

panva commented 4 years ago

@dborysov

Produce (sign/encrypt) iat option is in fact a boolean, not a string.

https://github.com/panva/paseto/tree/v1.0.4/docs#v2signpayload-key-options

iat: When true it pushes the "iat" to the PASETO payload. Default: 'true'

https://github.com/panva/paseto/blob/v1.0.4/lib/help/apply_options.js#L12-L20