Encode and decode Tender Multipass tokens
Tender provides a mechanism for single sign-on known as Multipass. Multipass uses an AES encrypted JSON hash and node-multipass provides functions for encoding and decoding these tokens.
More details on Multipass can be found here.
npm install multipass
Multipass is constructed with two arguments: an API key and a site key. These keys can be found within the Tender admin (Accounts & Settings > Extras > Single Sign-On).
var Multipass = ;// Construct the Multipass encoder / decodervar multipass = 'API-KEY' 'SITE-KEY';// Encode a Multipass tokenvar token = multipass;// Decode a Multipass tokenvar obj = multipass;
This function encodes the required
This function will return a string. If an error occurs, the
undefined will be returned.
This function decodes the required
undefined is returned.