Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 337B2200C01 for ; Wed, 14 Dec 2016 13:25:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3231D160B19; Wed, 14 Dec 2016 12:25:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 48B7A160B34 for ; Wed, 14 Dec 2016 13:25:53 +0100 (CET) Received: (qmail 99177 invoked by uid 500); 14 Dec 2016 12:25:52 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 98918 invoked by uid 99); 14 Dec 2016 12:25:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2016 12:25:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0B81BF16A3; Wed, 14 Dec 2016 12:25:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Date: Wed, 14 Dec 2016 12:25:53 -0000 Message-Id: In-Reply-To: <82155457201d492c9232c79406a0e52e@git.apache.org> References: <82155457201d492c9232c79406a0e52e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/4] cxf-fediz git commit: More refactoring archived-at: Wed, 14 Dec 2016 12:25:54 -0000 More refactoring Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/4a08fe5b Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/4a08fe5b Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/4a08fe5b Branch: refs/heads/master Commit: 4a08fe5bea001bdf64a10488067f17ec6464f48f Parents: 31c7552 Author: Colm O hEigeartaigh Authored: Wed Dec 14 11:45:28 2016 +0000 Committer: Colm O hEigeartaigh Committed: Wed Dec 14 11:45:28 2016 +0000 ---------------------------------------------------------------------- .../idp/beans/SigninParametersCacheAction.java | 40 ++++++++++---------- .../flows/federation-validate-request.xml | 4 +- .../webapp/WEB-INF/flows/signin-request.xml | 2 - .../webapp/WEB-INF/flows/signin-response.xml | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4a08fe5b/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 538841d..bbecc5a 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 @@ -54,17 +54,20 @@ public class SigninParametersCacheAction { if (value != null) { signinParams.put(IdpConstants.CONTEXT, value); } + value = WebUtils.getAttributeFromFlowScope(context, IdpConstants.REALM); + if (value != null) { + signinParams.put(IdpConstants.REALM, value); + } + value = WebUtils.getAttributeFromFlowScope(context, IdpConstants.RETURN_ADDRESS); + if (value != null) { + signinParams.put(IdpConstants.RETURN_ADDRESS, value); + } + value = WebUtils.getAttributeFromFlowScope(context, IdpConstants.RETURN_ADDRESS); + if (value != null) { + signinParams.put(IdpConstants.RETURN_ADDRESS, value); + } - if ("wsfed".equals(protocol)) { - value = WebUtils.getAttributeFromFlowScope(context, IdpConstants.RETURN_ADDRESS); - if (value != null) { - signinParams.put(FederationConstants.PARAM_REPLY, value); - } - value = WebUtils.getAttributeFromFlowScope(context, IdpConstants.REALM); - if (value != null) { - signinParams.put(IdpConstants.REALM, value); - } - } else if ("samlsso".equals(protocol)) { + if ("samlsso".equals(protocol)) { value = WebUtils.getAttributeFromFlowScope(context, IdpConstants.SAML_AUTHN_REQUEST); if (value != null) { signinParams.put(IdpConstants.SAML_AUTHN_REQUEST, value); @@ -96,12 +99,16 @@ public class SigninParametersCacheAction { if (value != null) { WebUtils.putAttributeInFlowScope(context, IdpConstants.REALM, value); } + value = (String)signinParams.get(IdpConstants.RETURN_ADDRESS); + if (value != null) { + WebUtils.putAttributeInFlowScope(context, IdpConstants.RETURN_ADDRESS, value); + } + value = (String)signinParams.get(IdpConstants.CONTEXT); + if (value != null) { + WebUtils.putAttributeInFlowScope(context, IdpConstants.CONTEXT, value); + } if ("wsfed".equals(protocol)) { - value = (String)signinParams.get(FederationConstants.PARAM_REPLY); - if (value != null) { - WebUtils.putAttributeInFlowScope(context, FederationConstants.PARAM_REPLY, value); - } WebUtils.removeAttributeFromFlowScope(context, FederationConstants.PARAM_CONTEXT); LOG.info("SignIn parameters restored and " + FederationConstants.PARAM_CONTEXT + "[" @@ -115,11 +122,6 @@ public class SigninParametersCacheAction { } } - value = (String)signinParams.get(IdpConstants.CONTEXT); - if (value != null) { - WebUtils.putAttributeInFlowScope(context, IdpConstants.CONTEXT, value); - } - } else { LOG.debug("Error in restoring security context"); } http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4a08fe5b/services/idp/src/main/webapp/WEB-INF/flows/federation-validate-request.xml ---------------------------------------------------------------------- diff --git a/services/idp/src/main/webapp/WEB-INF/flows/federation-validate-request.xml b/services/idp/src/main/webapp/WEB-INF/flows/federation-validate-request.xml index 52b5d04..3581ef2 100644 --- a/services/idp/src/main/webapp/WEB-INF/flows/federation-validate-request.xml +++ b/services/idp/src/main/webapp/WEB-INF/flows/federation-validate-request.xml @@ -134,7 +134,7 @@ - + @@ -143,7 +143,7 @@ - + http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4a08fe5b/services/idp/src/main/webapp/WEB-INF/flows/signin-request.xml ---------------------------------------------------------------------- diff --git a/services/idp/src/main/webapp/WEB-INF/flows/signin-request.xml b/services/idp/src/main/webapp/WEB-INF/flows/signin-request.xml index 78b149e..d618c76 100644 --- a/services/idp/src/main/webapp/WEB-INF/flows/signin-request.xml +++ b/services/idp/src/main/webapp/WEB-INF/flows/signin-request.xml @@ -115,8 +115,6 @@ - - +