code: function handleSocketToken(req, res, next) {
  		const transomNonce = server.registry.get(nonceHandler);
  
  		function loggable(token) {
  			if (typeof transomNonce.loggableToken === 'function') {
  				return transomNonce.loggableToken(token);
  			}
  			return `${token.substr(0, 4)}***${token.substr(-4)}`;
  		}
  
  		var p = new Promise(function (resolve, reject) {
  			// Create the nonce with req.locals.user as the payload.
  			transomNonce.createNonce(req.locals.user, nonceExpirySeconds, function (err, nonce) {
  				if (err) {
  					debug('Error creating nonce', err);
  					return reject(err);
  				}
  				debug(`Created nonce ${loggable(nonce.token)}`);
  				resolve(nonce);
  			});
  		}).then(function (nonce) {
  			debug(`Replying with ${loggable(nonce.token)}`);
  			res.json({
  				token: nonce.token
  			});
  			next();
  		}).catch(function (err) {
  			debug('Error in handleSocketToken', err);
  			next(err);
  		});
  	}
docs: handleUserMe *******************************************************