AnsweredAssumed Answered

How to call authenticated web scripts

Question asked by sgartner on Mar 4, 2010
Latest reply on Mar 4, 2010 by sgartner
I have enabled the remote object in my Alfresco and so I can call external and internal URLs from my web script like this:

var tabWebScriptUrl = "/authenticatedTabs";

// Initiate a remote connector
var connector = remote.connect("alfresco");

    // Get the tabs
    var result =;

    // Process the service return
    if (result !== null)
        model.tabResults = result.toString();
catch (err)
    logger.log("Failure to load tabs from url (" + tabWebScriptUrl + "): " + err.message);

The problem is that it is only calling the web scripts with the "service" authentication methodology instead of "wcservice" that we are using.  I can't seem to figure out how to call these scripts in a way that will allow them to access the user's information.  Here is the error that I'm getting:

The Web Script /alfresco/s/authenticatedTabs has responded with a status of 401 - Unauthorized.

Does anyone know how to get it to work with authenticated scripts (<authentication>user</authentication>)?