Skip to content

Instantly share code, notes, and snippets.

@Elektordi
Last active April 11, 2024 12:05
Show Gist options
  • Save Elektordi/87eb6e7f60e4190fbbf913df4e03fd05 to your computer and use it in GitHub Desktop.
Save Elektordi/87eb6e7f60e4190fbbf913df4e03fd05 to your computer and use it in GitHub Desktop.
Decode SAML payload from command line
#!/bin/sh
token="$1"
if [ -z "$token" ]; then
read token
fi
echo $token | sed -e "s/-/+/" -e "s/_/\//" | base64 -d | xmllint --format --recover -
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment