module.exports.getInfra = function()

in source/shared-modules/token-manager/token-manager.js [261:284]


module.exports.getInfra = function(input, callback) {
    // Create URL for user-manager request
    var tenantsUrl   = configuration.url.tenant + 's/system/';
    console.log(tenantsUrl);
    request({
        url: tenantsUrl,
        method: "GET",
        json: true,
        headers: {
            "content-type": "application/json",
        }
    }, function (error, response, body) {
        if (!error && response.statusCode === 200) {
            callback(null, body);
        } else {
            if (!error) {
                var lookupError = new Error("Failed looking up infra: " + response.body.Error);
                callback(lookupError, response);
            } else {
                callback(error, response)
            }
        }
    });
}