문제

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?

도움이 되었습니까?

해결책 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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top