Hi, One of our applications is a java/Tomcat web-application that uses Ajax (REST calls). The problem: if CAS authentication filter intercepts an Ajax call, it asks for login - and then redirects to the requested REST url... but instead I'd like it to redirect to the HTML page that issues the call...
E.g. say my application contains: 1) REST service to get recent news: /rest/news 2) "page1.html" that among other things, has a "show news" button (that calls the news REST via Ajax) 2) "page2.html" with an identical "show news" button Now, say user browses to "page2.html", leaves it open - and leaves for lunch, during which his CAS session times out. Returning from lunch he presses the "show news" button. CAS authentication filter intercept the "rest/news" request and asks for a login, with "?service=myapp/rest/news". Our javascript programmer follows this redirect and shows the login screen. But after a successful login, CAS redirects to back to "/rest/news" which doesn't help much... I'd like to redirect to "page2.html" (or to "page1.html" - depending on which page issues the Ajax call). Has anyone managed to achieve this? I was thinking to ask our javascript programmer to add some header (perhaps "referer") to all his Ajax calls, indicating the page requested in the address bar (page1 or page2). Has anyone found a more standard way? Thanks very much -- 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
