Skip to content

Fix JWS base 64 encoding - #8

Merged
noha merged 3 commits into
noha:masterfrom
ba-st-dependencies:master
Dec 6, 2019
Merged

noha merged 3 commits into
noha:masterfrom
ba-st-dependencies:master

Conversation

@gcotelli

@gcotelli gcotelli commented Dec 4, 2019 •

Copy link
Copy Markdown
Contributor

According to RFC7519 the encoding needs to be base64Url (the URL and Filename safe version) and not standard base64.

Section 3 of the RFC:

A JWT is represented as a sequence of URL-safe parts separated by
period ('.') characters. Each part contains a base64url-encoded
value. The number of parts in the JWT is dependent upon the
representation of the resulting JWS using the JWS Compact
Serialization or JWE using the JWE Compact Serialization.

Base64URL encoding is explained in section 5 of RFC 4648

Acording  to RFC7519 (https://tools.ietf.org/html/rfc7519#page-4) the encoding needs to be base64Url (the URL and Filename safe version) and not standard base64.
@gcotelli

gcotelli commented Dec 4, 2019

Copy link
Copy Markdown
Contributor Author

By the way https://jwt.io has an online tool to verify JWTs

@noha
noha merged commit 24dedbb into noha:master Dec 6, 2019
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 this pull request may close these issues.

2 participants