cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1519223 - in /cxf/fediz/trunk/services/idp/src/main: java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java java/org/apache/cxf/fediz/service/idp/beans/ValidateTokenAction.java webapp/WEB-INF/signinresponseform.jsp
Date Sat, 31 Aug 2013 21:12:33 GMT
Author: owulff
Date: Sat Aug 31 21:12:32 2013
New Revision: 1519223

URL: http://svn.apache.org/r1519223
Log:
[FEDIZ-3] fix for wctx handling. Thanks Thierry.

Modified:
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ValidateTokenAction.java
    cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/signinresponseform.jsp

Modified: cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java?rev=1519223&r1=1519222&r2=1519223&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
(original)
+++ cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
Sat Aug 31 21:12:32 2013
@@ -54,7 +54,7 @@ public class SigninParametersCacheAction
             LOG.debug("SignIn parameters cached: " + signinParams.toString() + ".");
         }
         WebUtils.putAttributeInFlowScope(context, FederationConstants.PARAM_CONTEXT, uuidKey);
-        LOG.info("SignIn parameters cached and wctx set to: " + uuidKey + ".");
+        LOG.info("SignIn parameters cached and " + FederationConstants.PARAM_CONTEXT + "
set to [" + uuidKey + "].");
     }
     
     public void restore(RequestContext context) {
@@ -80,6 +80,7 @@ public class SigninParametersCacheAction
         if (LOG.isDebugEnabled()) {
             LOG.debug("SignIn parameters restored: " + signinParams.toString() + ".");
         }
-        LOG.info("SignIn parameters restored.");
+        WebUtils.removeAttributeFromFlowScope(context, FederationConstants.PARAM_CONTEXT);
+        LOG.info("SignIn parameters restored and " + FederationConstants.PARAM_CONTEXT +
"[" + uuidKey + "] cleared.");
     }
 }
\ No newline at end of file

Modified: cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ValidateTokenAction.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ValidateTokenAction.java?rev=1519223&r1=1519222&r2=1519223&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ValidateTokenAction.java
(original)
+++ cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ValidateTokenAction.java
Sat Aug 31 21:12:32 2013
@@ -116,7 +116,7 @@ public class ValidateTokenAction {
         idpToken.setToken(e);
         LOG.info("[IDP_TOKEN=" + id + "] for user '" + wfResp.getUsername()
                 + "' created from [RP_TOKEN=" + wfResp.getUniqueTokenId()
-                + "issued by home realm [" + whr + "/"
+                + "] issued by home realm [" + whr + "/"
                 + wfResp.getIssuer() + "].");
         if (LOG.isDebugEnabled()) {
             LOG.debug("Created date=" + wfResp.getTokenCreated());

Modified: cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/signinresponseform.jsp
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/signinresponseform.jsp?rev=1519223&r1=1519222&r2=1519223&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/signinresponseform.jsp (original)
+++ cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/signinresponseform.jsp Sat Aug 31
21:12:32 2013
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
 <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+
 <html>
 <head>
 <title>IDP SignIn Response Form</title>
@@ -9,13 +10,16 @@
 	<form:form method="POST" id="signinresponseform" name="signinresponseform" action="${fedAction}"
htmlEscape="true">
         <input type="hidden" name="wa" value="wsignin1.0" /><br />
         <input type="hidden" name="wresult" value="${fedWResult}" /><br />
-        <input type="hidden" name="wctx" value="${fedWCtx}" /><br />
+        <% String wctx = (String)request.getAttribute("fedWCtx");
+           if (wctx != null && !wctx.isEmpty()) { %>
+        	<input type="hidden" name="wctx" value="${fedWCtx}" /><br />
+	    <% } %>
         <input type="hidden" name="wtrealm" value="${fedWTrealm}" /><br />
- 		<noscript>
+  		<noscript>
 		<p>Script is disabled. Click Submit to continue.</p>
 		<input type="submit" name="_eventId_submit" value="Submit" /><br />
-		</noscript>
+ 		</noscript>
 	</form:form>
-	<script language="javascript">window.setTimeout('document.forms[0].submit()',0);</script>
+ 	<script language="javascript">window.setTimeout('document.forms[0].submit()',0);</script>
 </body>
 </html>



Mime
View raw message