Hi Rodrigo, Ii'm experiencing the same issue: after a session timeout (on client's app) the ajax request are not redirecting to que CAS login page. I've also tried with Omnifaces<https://showcase-omnifaces.rhcloud.com/showcase/exceptionhandlers/FullAjaxExceptionHandler.xhtml> ...
How did you solve this? Thanks, Gil On Monday, December 17, 2012 10:41:31 AM UTC-2, Rodrigo Parra wrote: > > Hello all, > > I finally got it working! > It was indeed an application configuration error, I was missing a '/' > (slash) at the end of app2's URL on web.xml. > I'm not sure it that's expected behavior or not, probably single sign out > filter's url pattern was pointing towards that direction. > > Anyways, now single sign out is doing its job, almost all of it. > After logging out of app1, app2's session gets removed and refreshing > app2's page sends back to CAS login page. > > However, clicking through app2 (making AJAX requests basically) doesn't > send me back to login page, instead the application crashes. Notice that > app1 and app2 are basically one page RIAs, so they don't refresh often. > > Checking Chrome's Web Inspector, I can see the browser makes a GET > requesting the login page, however the request status remains as pending. > This probably means CAS server is not responding, right? > > The only difference I can notice between the GET requests being made by a > page refresh (response OK) and an AJAX call (pending) are the request > headers: > > Headers after a page refresh: > > GET /cas/login?TARGET=http%3A%2F%2FserverIP%3A8080%2Fapp2%2F HTTP/1.1 > Host: casServerIP:8443 > Connection: keep-alive > User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, > like Gecko) Chrome/23.0.1271.91 Safari/537.11 > Accept: */* > Referer: http://serverIP:8080/app2/ > Accept-Encoding: gzip,deflate,sdch > Accept-Language: es-419,es;q=0.8 > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 > Cookie: JSESSIONID=AK+NFXbjAxYSC0ftkeK0XDsX.undefined > > Headers after an AJAX call: > > Referer:http://serverIP:8080/app2/?cod=MYCOD > User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like > Gecko) Chrome/23.0.1271.91 Safari/537.11 > > As you can see, the GET after an AJAX call has fewer headers. > The other difference would be the referer, that has an URL parameters > that's used in app2, it shouldn't mean anything for CAS server. Could this > be the source of the problem? If so, how could I change the GET referer? > > I would like the user to be redirected to CAS login page after any AJAX > call is made, and it seems that is CAS expected behaviour too. Any thoughts > on this issue? Again, thanks in advance for your help. > > 2012/12/10 Marvin Addison <[email protected]> > >> > Searching through the sniffer's results I can even see app1 server >> > responding to CAS server after the logout POST request is received. >> > >> > app1 server responds with a 302 code, redirecting to app1's URL. >> >> All this suggests the CAS server is behaving correctly and you've got >> some kind of configuration problem in your CAS client application. As >> for what the particular problem is it's hard to say; concentrate on >> the client config is all I can offer. >> >> M >> >> -- >> You are currently subscribed to [email protected] as: >> [email protected] >> To unsubscribe, change settings or access archives, see >> http://www.ja-sig.org/wiki/display/JSG/cas-user >> > > -- > You are currently subscribed to [email protected] as: > [email protected] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user > > -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
