Author: theute
Date: 2011-11-29 05:02:18 -0500 (Tue, 29 Nov 2011)
New Revision: 8157
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
Log:
JBEPP-1408: In some cases, the very first login to /ecmdemo fails
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2011-11-29
09:59:33 UTC (rev 8156)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2011-11-29
10:02:18 UTC (rev 8157)
@@ -19,6 +19,7 @@
package org.exoplatform.web.login;
+import org.exoplatform.container.RootContainer;
import org.exoplatform.container.web.AbstractHttpServlet;
import org.exoplatform.web.security.security.AbstractTokenService;
import org.exoplatform.web.security.security.CookieTokenService;
@@ -53,10 +54,6 @@
public static final String COOKIE_NAME = "rememberme";
/** . */
- public static final long LOGIN_VALIDITY =
- 1000 *
TicketConfiguration.getInstance(TicketConfiguration.class).getValidityTime();
-
- /** . */
private WCIController wciController;
/** . */
@@ -112,7 +109,7 @@
else
{
// WCI authentication
- servletContainer.login(req, resp, credentials, LOGIN_VALIDITY,
wciController.getInitialURI(req));
+ servletContainer.login(req, resp, credentials, getLoginValidity(),
wciController.getInitialURI(req));
}
}
@@ -158,4 +155,9 @@
}
return wciController;
}
+
+ private long getLoginValidity()
+ {
+ return 1000 *
TicketConfiguration.getInstance(TicketConfiguration.class).getValidityTime();
+ }
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2011-11-29
09:59:33 UTC (rev 8156)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2011-11-29
10:02:18 UTC (rev 8157)
@@ -135,4 +135,4 @@
return str;
}
-}
\ No newline at end of file
+}
Show replies by date