diff --git a/lib/Utilities/Flex/TransientTokenUtility.php b/lib/Utilities/Flex/TransientTokenUtility.php new file mode 100644 index 000000000..ae633784a --- /dev/null +++ b/lib/Utilities/Flex/TransientTokenUtility.php @@ -0,0 +1,38 @@ +getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class()), $logConfig); + } + } + + /** + * Parse token for the given jwt string + */ + public function parseToken($jwt) + { + $splitContents = explode(".",$jwt); + if(sizeof($splitContents) > 1) + { + $encodedString = $splitContents[1]; + $decodedString = base64_decode($encodedString); + $transientTokenModel= json_decode($decodedString); + // return Transient token model and make use of that model. + return $transientTokenModel; + } + } +} + +?> \ No newline at end of file