Okay, I was able to work around the problem. Here's how I did it...
I modified the class net.sf.acegisecurity.ui.AbstractProcessingFilter the following ways:
I changed (line 287) from
Code:
if (httpRequest.getRequestURL().toString().endsWith(httpRequest
.getContextPath() + filterProcessesUrl)){
to
Code:
if (httpRequest.getRequestURL().toString().endsWith(httpRequest
.getContextPath() + filterProcessesUrl)
|| httpRequest.getParameter("ticket") != null) {
This allows the filter to run for every request containing a ticket.
I also changed (line 363) from
Code:
httpResponse.sendRedirect(httpResponse.encodeRedirectURL(targetUrl));
return;
to
Code:
if (httpRequest.getRequestURL().toString().endsWith(httpRequest
.getContextPath() + filterProcessesUrl)) {
httpResponse.sendRedirect(httpResponse.encodeRedirectURL(targetUrl));
return;
}
This way the user is only redirected for the URL that is coming from the CAS service.