tags:

views:

129

answers:

2

I need to write a google gadget that reads feeds from google groups. Trouble is I'm making an ajax call to retrieve the feeds and our google apps domain is protected by CAS (central authentication service). So, I'm getting a 400 bad request on making the call.

I suspect that the browser is not sending the cookie when making ajax call. How do I ensure that the cookie is also sent with the ajax call? OR if that's not supposed to be the problem, what do i need to do?

A: 

I have the same question... seems like the TGT cookie is not being sent with my ajax request to CAS for a ST. Any ideas why?

A: 

If you're making a plain-vanilla AJAX call (with jQuery, at least), the request will fail if the domain and subdomain both do not match. That is, if you're calling from app.mydomain.com to cas.mydomain.com, the request won't work.

In my testing the browser will send cookies along properly as you would expect, even on AJAX calls.

Also make sure that you're using the same protocol (HTTP or HTTPS) on both ends of the call (the app and the CAS server).

If you're using Firebug in Firefox, you should see the cookies being sent along with the request. If they're not showing up there, something else is likely going on that you'll have to dig up.

Here is a similar question that may be of benefit.

Steve Nay