Created
October 16, 2014 04:46
-
-
Save jksdua/8dae107fe5bd8d970c7d to your computer and use it in GitHub Desktop.
Decode url encoded SAML token
This file contains 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
// 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