Skip to content

Instantly share code, notes, and snippets.

@lechidung
Created December 7, 2018 15:25
Show Gist options
  • Save lechidung/a9c5a1ce699eb5dd6ba74978d98d2334 to your computer and use it in GitHub Desktop.
Save lechidung/a9c5a1ce699eb5dd6ba74978d98d2334 to your computer and use it in GitHub Desktop.
jwt - encodedHeader
var header = {
"alg": "HS256",
"typ": "JWT"
};
var stringifiedHeader = CryptoJS.enc.Utf8.parse(JSON.stringify(header));
var encodedHeader = base64url(stringifiedHeader);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment