Skip to content

Instantly share code, notes, and snippets.

@shirish87
Created March 14, 2024 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirish87/893c3d5808c1c87f58040cd1e61c3053 to your computer and use it in GitHub Desktop.
Save shirish87/893c3d5808c1c87f58040cd1e61c3053 to your computer and use it in GitHub Desktop.
jq-jwt.sh
jq -R 'split(".") | .[:2] | map( @base64d | fromjson | if (.exp) then (. + ({ "expiry": .exp | strflocaltime("%Y-%m-%dTT%H:%M:%S %Z") })) else . end )' <<< "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment