lib/auth.js
function getManagementToken(tenant, config = defaultConfig) {
  const payload = {
    service: tenant,
    username: config.dojot.management.user
  };
  return (
    new Buffer("jwt schema").toString("base64") +
    "." +
    new Buffer(JSON.stringify(payload)).toString("base64") +
    "." +
    new Buffer("dummy signature").toString("base64")
  );
}
function getManagementToken(tenant, config = defaultConfig) {
  const payload = {
    service: tenant,
    username: config.dojot.management.user
  };
  return (
    new Buffer("jwt schema").toString("base64") +
    "." +
    new Buffer(JSON.stringify(payload)).toString("base64") +
    "." +
    new Buffer("dummy signature").toString("base64")
  );
}
function getManagementToken ( tenant , config = defaultConfig ) { const payload = { service : tenant , username : config . dojot . management . user } ; return ( new Buffer ( "jwt schema" ) . toString ( "base64" ) + "." + new Buffer ( JSON . stringify ( payload ) ) . toString ( "base64" ) + "." + new Buffer ( "dummy signature" ) . toString ( "base64" ) ) ; }
Generates a dummy token
@param {string} tenant Tenant to be used when creating the token
Generates a dummy token