0

Is it possible to call json service from JavaScript which is behind a windows authenticated web site? Ultimately, I would like to do this from phonegap but right now trying to do this from browser.

My first attempt was to open a window have the user authenticate against the server and was hoping subsequent JavaScript/ajax requests would send the authentication information with the request. I don't think this is working is desired. I certainly know from phonegap this is not working.

MrMVCMan
  • 490
  • 2
  • 7
  • 20
  • Can you post the code that you are using? – Andrew Lively Sep 11 '13 at 01:04
  • What code are you looking for? The childbrowser window to the isa username/password page or a very simple ajax call to a service? Have you been able to do this? (is this even possible?) – MrMVCMan Sep 11 '13 at 01:30
  • I'm just trying to get a better idea of how you are making the call and handling the returned info. I've done authentication between a server and PhoneGap before, just probably not the way you're trying to do it. Do you know where exactly it's breaking? Like is it getting to the server and stopping there, or is something being returned and it's not being handled right, that's what I'm trying to figure out – Andrew Lively Sep 11 '13 at 02:23
  • I am showing the windows ntlm forms based form, allowing user to enter credentials. Then when the window navigates to the next page i close the childbrowser expecting a cookie to be set to the device. I was hoping that this cookie would then be used on the next ajax request. It could be that this is not possible with ntlm forms based authentication. – MrMVCMan Sep 11 '13 at 12:19
  • The problem could also be that PhoneGap tends to not handle cookies well. Take a look at this: http://stackoverflow.com/questions/15349237/handling-cookies-in-phonegap-cordova – Andrew Lively Sep 11 '13 at 12:40

0 Answers0