Skip to content

Instantly share code, notes, and snippets.

@manlivo
manlivo / create-jwt-using-unix-commands-on-mac.md
Created June 4, 2020 06:18 — forked from jwreagor/create-jwt-using-unix-commands-on-mac.md
Create JWT Token Header Using Unix Command line tools ONLY!

Pseudocode:

Y = Base64URLEncode(Header) + ‘.’ + Base64URLEncode(Payload)
JWT = Y + ‘.’ + Base64URLEncode(HMACSHA256(Y))

The steps called out here should work on a Mac as well. The only thing that might be different is the sed command used below. Instead of using -E, you will have to use -r to run sed with extended regular expression support

Use data from this tutorial:

scotch.io

@manlivo
manlivo / gist:49441a2b25183ee130e8cca03b232538
Created June 6, 2018 10:20 — forked from fajrif/gist:1265203
git clone specific tag
git clone <repo-address>
git tag -l
git checkout <tag-name>
git branch -D master
git checkout -b master