Skip to content

Bug - Unpadded JWTs not working #38

@atrauzzi

Description

@atrauzzi

I believe at the following line: https://github.com/artemeff/jwt/blob/master/src/jwt.erl#L146

...an error is occurring when attempting to decode un-padded base64 values.

As per 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.)

I think this library needs to allow for un-padded base64 encoded JWT parts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions