Skip to content

Instantly share code, notes, and snippets.

@jksdua
Created October 16, 2014 04:46
Show Gist options
  • Save jksdua/8dae107fe5bd8d970c7d to your computer and use it in GitHub Desktop.
Save jksdua/8dae107fe5bd8d970c7d to your computer and use it in GitHub Desktop.
Decode url encoded SAML token
// Usage: decode.js "..."
// make sure to `npm install zlib` beforehand
// url -> base64 -> inflate
console.info('\n\nDecoded SAML:');
console.info('-------------\n');
console.info(
require('zlib').inflateRawSync(
new Buffer(
unescape(process.argv[process.argv.length - 1]),
'base64'
)
).toString('utf8')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment