views:

15

answers:

0

I am just trying to access a webservice or any webpage for that matter through ajax(only ajax is allowed for some reasons).The webservice is protected by coroporate SSO. In the sense, when the webpage X is requested for the first time, you get redirected to the login page Y,which is outside of the app. Upon authentication,you get auto redirected to the page X. Subsequent requests to page X will work without authentication. Of course, all these are handled through cookies. Whether or not to display login page Y is determined by the presence/validity/content of a few cookies.

Now, I am trying to access this protected resource X through ajax. Is it possible to achieve this using ajax? How can cookies be handled in an ajax request?