jwt-express.js
function(secret, payload) {
        if (!secret) {
            throw new ReferenceError('secret must be defined');
        }
        
        if (typeof secret == 'string') {
            var _secret = secret;
            secret = function(payload) {return _secret};
        }
        
        var jwt = new JWT(secret(payload), this.options);
        return jwt.sign(payload);
    }
function(secret, payload) {
        if (!secret) {
            throw new ReferenceError('secret must be defined');
        }
        
        if (typeof secret == 'string') {
            var _secret = secret;
            secret = function(payload) {return _secret};
        }
        
        var jwt = new JWT(secret(payload), this.options);
        return jwt.sign(payload);
    }
/*
create - creates a JWT without storing it
@param string|function secret If secret is a string, that will be used
to verify / sign with. If secret is a function, that function will be
called with the payload as it's first parameter, and must
return a string which will be used to verify / sign with.
@param object payload The payload of the JWT
@return JWT