I am trying to authenticate against a web service that doesn't support OAuth. I run into two issues while attempting to do this:
- The web service replies with an HTTP 302 response code on successful login. My callback is not invoked with that response however, instead the module method makeWebRequest makes another request to the web service with the updated Location, using the same method, options and parameters.
- In the response, the web service sets a cookie containing the authentication token. I would like this cookie to be sent on subsequent requests to the same host. The module method makeWebRequest doesn't seem to do this, nor does it allow me to access the cookie value returned on the initial request.
Any suggestions?
Thanks,
Ernst.