Author: mwringe
Date: 2011-10-03 11:41:36 -0400 (Mon, 03 Oct 2011)
New Revision: 7609
Modified:
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/CASLogoutFilter.java
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/InitiateLoginFilter.java
Log:
GTNPORTAL-2147: Update the InitiateLoginFilter to work properly with the current gatein
login infrastructure. Update the CASLogoutFilter to include the proper redirect url, and
support automatic redirects.
Modified:
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/CASLogoutFilter.java
===================================================================
---
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/CASLogoutFilter.java 2011-10-03
15:17:29 UTC (rev 7608)
+++
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/CASLogoutFilter.java 2011-10-03
15:41:36 UTC (rev 7609)
@@ -60,11 +60,8 @@
{
try
{
- String parameters = URLEncoder.encode(
- "portal:componentId=UIPortal&portal:action=Logout",
"UTF-8");
+ String redirectUrl = this.logoutUrl+"?service="+httpRequest.getRequestURL()
+ "&url="+httpRequest.getRequestURL();
- String redirectUrl =
this.logoutUrl+"?url="+httpRequest.getRequestURL()+"?"+parameters;
-
httpRequest.getSession().invalidate();
return redirectUrl;
Modified:
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/InitiateLoginFilter.java
===================================================================
---
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/InitiateLoginFilter.java 2011-10-03
15:17:29 UTC (rev 7608)
+++
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/InitiateLoginFilter.java 2011-10-03
15:41:36 UTC (rev 7609)
@@ -28,11 +28,13 @@
private String ssoCookieName;
private boolean casRenewTicket;
private String casServiceUrl;
+ private String loginUrl;
public void init(FilterConfig filterConfig) throws ServletException
{
this.ssoServerUrl = filterConfig.getInitParameter("ssoServerUrl");
this.ssoCookieName = filterConfig.getInitParameter("ssoCookieName");
+ this.loginUrl = filterConfig.getInitParameter("loginUrl");
String casRenewTicketConfig =
filterConfig.getInitParameter("casRenewTicket");
if(casRenewTicketConfig != null)
@@ -65,7 +67,8 @@
return;
}
- chain.doFilter(request, response);
+ resp.sendRedirect(loginUrl);
+ return;
}
catch(Exception e)
{
Show replies by date