Skip to content

Instantly share code, notes, and snippets.

@ejohn20
Created February 15, 2024 16:02
Show Gist options
  • Save ejohn20/6e228c5bac42f314705ff9b619882599 to your computer and use it in GitHub Desktop.
Save ejohn20/6e228c5bac42f314705ff9b619882599 to your computer and use it in GitHub Desktop.
JWT Decode Shortcuts
jwt-decode() {
jq -R 'split(".") | .[1] | @base64d | fromjson' <<<"$1"
}
jwt-header-decode() {
jq -R 'split(".") | .[0] | @base64d | fromjson' <<<"$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment