Created
March 19, 2025 14:21
-
-
Save JekRock/4fd0fc1aed3d44dde8c52734a5a40916 to your computer and use it in GitHub Desktop.
jwt-decode
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
# https://www.pgrs.net/2022/06/02/simple-command-line-function-to-decode-jwts/ | |
jwt-decode() { | |
jq -R 'split(".") |.[0:2] | map(gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=") | @base64d) | map(fromjson)' <<< $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment