NTLN authentication w/ XmlHttpRequest in widget

Discussion in 'Mac Programming' started by gdurzi, Jul 15, 2008.

  1. gdurzi macrumors newbie

    Joined:
    Jul 15, 2008
    #1
    Hey all,
    I'm working on a widget that needs to access a Microsoft based web service that authenticates using NTLM.

    I can't figure out a way to get an XmlHttpRequest object to use NTLM authentication.

    I came across curl which seems to do this, but can't find any examples of using curl within a widget.

    Can anyone point me to some examples or provide some advice on how to figure this out?

    Thanks!
     
  2. gdurzi thread starter macrumors newbie

    Joined:
    Jul 15, 2008
    #2
    In case anybody is interested, I figured out how to use curl from within the widget's javascript. I first had to set the AllowSystem key to true, and then I can do something like:

    var curlString = "/usr/bin/curl -u " + credentials + " -L " + Url + " --ntlm";
    var output = widget.system(curlString, null).outputString;

    My next step is to figure out how to execute a SOAP request using curl. Making progress though ...
     

Share This Page