cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf-fediz git commit: Restore the original wctx value after getting a response from the remote IdP
Date Thu, 23 Apr 2015 10:09:57 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master db91db46e -> 608b6e944


Restore the original wctx value after getting a response from the remote IdP


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/608b6e94
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/608b6e94
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/608b6e94

Branch: refs/heads/master
Commit: 608b6e9440ca0eaaa83bc9f7fa751844928d417a
Parents: db91db4
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Apr 23 11:09:30 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Apr 23 11:09:30 2015 +0100

----------------------------------------------------------------------
 .../service/idp/beans/SigninParametersCacheAction.java      | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/608b6e94/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
----------------------------------------------------------------------
diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
index 93fab36..69b1d0e 100644
--- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
+++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/SigninParametersCacheAction.java
@@ -57,6 +57,10 @@ public class SigninParametersCacheAction {
         if (value != null) {
             signinParams.put(FederationConstants.PARAM_HOME_REALM, value);
         }
+        value = WebUtils.getAttributeFromFlowScope(context, FederationConstants.PARAM_CONTEXT);
+        if (value != null) {
+            signinParams.put(FederationConstants.PARAM_CONTEXT, value);
+        }
         WebUtils.putAttributeInExternalContext(context, uuidKey, signinParams);
         
         LOG.debug("SignIn parameters cached: {}", signinParams.toString());
@@ -94,6 +98,11 @@ public class SigninParametersCacheAction {
             WebUtils.removeAttributeFromFlowScope(context, FederationConstants.PARAM_CONTEXT);
             LOG.info("SignIn parameters restored and " + FederationConstants.PARAM_CONTEXT
+ "[" 
                 + uuidKey + "] cleared.");
+            
+            value = (String)signinParams.get(FederationConstants.PARAM_CONTEXT);
+            if (value != null) {
+                WebUtils.putAttributeInFlowScope(context, FederationConstants.PARAM_CONTEXT,
value);
+            }
         } else {
             LOG.debug("Error in restoring security context");
         }


Mime
View raw message