Created
March 14, 2024 16:48
-
-
Save shirish87/893c3d5808c1c87f58040cd1e61c3053 to your computer and use it in GitHub Desktop.
jq-jwt.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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