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

Bug: Format uses base64urlpad #35

Closed
ukstv opened this issue May 12, 2022 · 1 comment · Fixed by #39
Closed

Bug: Format uses base64urlpad #35

ukstv opened this issue May 12, 2022 · 1 comment · Fixed by #39

Comments

@ukstv
Copy link

ukstv commented May 12, 2022

JWT uses base64url encoding. The code uses base64urlpad: https://github.com/ipld/js-dag-ucan/blob/main/src/formatter.js#L4

From the spec:

Base64url Encoding
      Base64 encoding using the URL- and filename-safe character set
      defined in Section 5 of RFC 4648 [RFC4648], with all trailing '='
      characters omitted (as permitted by Section 3.2) and without the
      inclusion of any line breaks, whitespace, or other additional
      characters.  Note that the base64url encoding of the empty octet
      sequence is the empty string.  (See Appendix C for notes on
      implementing base64url encoding without padding.)
@Gozala
Copy link
Collaborator

Gozala commented May 13, 2022

Thanks for catching & reporting

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 a pull request may close this issue.

2 participants