Add support for urlsafe base64 in decode_jwt.

This commit is contained in:
Tom Alexander 2024-06-21 19:23:08 -04:00
parent 78ea5dc244
commit b0a2086b6c
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -5,4 +5,4 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec jq -R 'split(".") | .[0],.[1] | @base64d | fromjson' exec jq -R 'split(".") | .[0],.[1] | gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=")| @base64d | fromjson'