JWT(JSON Web Token) encode and decode module for node.js.
JWT is used by Google In-App Payments.
$ npm install jwt-simple
var jwt = require('jwt-simple');
var payload = { foo: 'bar' };
var secret = 'xxx';
// encode
var token = jwt.encode(payload, secret);
// decode
var decoded = jwt.decode(token, secret);
console.log(decoded); //=> { foo: 'bar' }