Replies: 1 comment 1 reply
-
"Reference implementation" says
Poking at JWT for being JSON only (despite the JWS format serving the role of arbitrary data), and yet the RFC says that
Anyway. I would be fine with the change if you removed strings as input, only leave in Buffers. Assuming utf-8 for a string is just as bad as assuming only objects will be payloads and the last thing i wish to be dealing with is more options for used input encoding. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
The reference PHP implementation allows "to store arbitrary binary data in a PASETO, by invoking the Protocol classes directly". The same is true of other library implementations of PASETO.
I have a change here that allows just that, for interoperability with other implementations: 722ea12 Would that be something acceptable as a PR?
TL;DR:
V1
,V2
}.{encrypt
,sign
} functions would now accept astring
orBuffer
payload.V1
,V2
}.{decrypt
,verify
} functions would now accept a{ buffer: true }
option to return the payload asBuffer
.Beta Was this translation helpful? Give feedback.
All reactions