Question

I want to connect from worklight to a domino domain and retrieve some data from an application. There is a url of the form http://domain.com/names.nsf?login&username=myname&password=mypass that if i send a request to from my browser, i will be authenticated. So if then i request http://domain.com/app1 i will be already logged in. In my browser there is a session cookie so this is how it is achieved.

How can i do it from worklight? I want to: 1. Retrieve the cookie from my first call to authApp (it doesnt return any json) 2. Attach it to any of my next requests to the same domain

Any suggestions?

Was it helpful?

Solution 2

It sounds like the Domino server is configured to use Session authentication. I don't disagree with the previous response. That sounds right if you must use session auth, but it may be easier to use Basic authentication.

For a comparison of session and basic auth see Authenticating Domino REST Service Requests. If the server is configured for session auth, you can still use basic auth for your requests. But you should consider adding web site rules to override session auth for selected URLs.

OTHER TIPS

Here is a similar question: Attaching cookie to WorkLight Adapter response header .

You can use an adapter call to authenticate from the client and get the cookie from the response on the client side and save it. Then send the cookie from the client with each request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top