diff --git a/src/utilities/flex/TransientTokenUtility.js b/src/utilities/flex/TransientTokenUtility.js new file mode 100644 index 00000000..cd06fe6e --- /dev/null +++ b/src/utilities/flex/TransientTokenUtility.js @@ -0,0 +1,22 @@ + +'use strict'; + +function TransientTokenUtility() +{ + +} + +TransientTokenUtility.prototype.parseToken = function parseToken(jwt) +{ + var splitContents = jwt.split("."); + if(splitContents.length > 1) + { + var encodedString = splitContents[1]; + var data = new Buffer(encodedString); + var decodedString =data.toString('base64'); + var transientTokenModel= JSON.parse(decodedString); + // return JTI string + return transientTokenModel; + } +} +module.exports = TransientTokenUtility; \ No newline at end of file