Add the decode_jwt script.

This commit is contained in:
Tom Alexander
2026-05-06 09:49:47 -04:00
parent 9a9268f8cc
commit 856e4daee6
3 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
#
# Decode the contents of a JWT
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec jq -R 'split(".") | .[0],.[1] | gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=")| @base64d | fromjson'