[gatein-commits] gatein SVN: r2619 - components/sso/branches/1.0.0-epp-5.0.0-CR01-Branch/agent/src/main/java/org/gatein/sso/agent.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Apr 14 05:03:02 EDT 2010
Author: thomas.heute at jboss.com
Date: 2010-04-14 05:03:01 -0400 (Wed, 14 Apr 2010)
New Revision: 2619
Modified:
components/sso/branches/1.0.0-epp-5.0.0-CR01-Branch/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java
Log:
GTNPORTAL-1027: GateIn+SSO integration: Blank screen when SSO ticket is not valid (OpenSSO)
Modified: components/sso/branches/1.0.0-epp-5.0.0-CR01-Branch/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java
===================================================================
--- components/sso/branches/1.0.0-epp-5.0.0-CR01-Branch/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java 2010-04-14 08:50:29 UTC (rev 2618)
+++ components/sso/branches/1.0.0-epp-5.0.0-CR01-Branch/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java 2010-04-14 09:03:01 UTC (rev 2619)
@@ -63,7 +63,16 @@
{
try
{
- this.processSSOToken(req,resp);
+ this.processSSOToken(req,resp);
+
+ String portalContext = req.getContextPath();
+ if(req.getAttribute("abort") != null)
+ {
+ String ssoRedirect = portalContext + "/sso";
+ resp.sendRedirect(ssoRedirect);
+ return;
+ }
+
super.doGet(req, resp);
}
catch(Exception e)
@@ -96,8 +105,16 @@
}
else
{
- //See if an OpenSSO Token was used
- OpenSSOAgent.getInstance(this.ssoServerUrl, this.ssoCookieName).validateTicket(httpRequest);
+ try
+ {
+ //See if an OpenSSO Token was used
+ OpenSSOAgent.getInstance(this.ssoServerUrl, this.ssoCookieName).validateTicket(httpRequest);
+ }
+ catch(IllegalStateException ilse)
+ {
+ //somehow cookie failed validation, retry by starting the opensso login process again
+ httpRequest.setAttribute("abort", Boolean.TRUE);
+ }
}
}
}
More information about the gatein-commits
mailing list