Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE49418342 for ; Thu, 14 Jan 2016 16:47:42 +0000 (UTC) Received: (qmail 55941 invoked by uid 500); 14 Jan 2016 16:47:42 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 55885 invoked by uid 500); 14 Jan 2016 16:47:42 -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 55876 invoked by uid 99); 14 Jan 2016 16:47:42 -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; Thu, 14 Jan 2016 16:47:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4CCF3E386C; Thu, 14 Jan 2016 16:47:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbernhardt@apache.org To: commits@cxf.apache.org Message-Id: <62065fe0343448289beae065a2315c31@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf-fediz git commit: Fediz IDP Spring config cleanup Date: Thu, 14 Jan 2016 16:47:42 +0000 (UTC) Repository: cxf-fediz Updated Branches: refs/heads/master 61be9e5f7 -> def5708ef Fediz IDP Spring config cleanup Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/def5708e Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/def5708e Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/def5708e Branch: refs/heads/master Commit: def5708efda3b5fef007bf09c4d2f3c8532aea47 Parents: 61be9e5 Author: Jan Bernhardt Authored: Thu Jan 7 17:03:13 2016 +0100 Committer: Jan Bernhardt Committed: Thu Jan 14 17:47:25 2016 +0100 ---------------------------------------------------------------------- .../idp/beans/CacheTokenForWauthAction.java | 3 +- .../service/idp/beans/HomeRealmReminder.java | 4 +- .../fediz/service/idp/beans/LogoutAction.java | 3 +- .../idp/beans/ProcessHRDSExpressionAction.java | 6 +- .../idp/beans/SigninParametersCacheAction.java | 2 + .../idp/beans/TrustedIdpProtocolAction.java | 6 +- .../fediz/service/idp/beans/WfreshParser.java | 3 +- .../WEB-INF/flows/federation-signin-request.xml | 2 +- .../flows/federation-signin-response.xml | 2 +- .../flows/federation-validate-request.xml | 2 +- .../idp/src/main/webapp/WEB-INF/idp-servlet.xml | 129 +++++++------------ .../src/test/resources/realmb/idp-servlet.xml | 19 --- 12 files changed, 63 insertions(+), 118 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/CacheTokenForWauthAction.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/CacheTokenForWauthAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/CacheTokenForWauthAction.java index 852a338..15e0589 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/CacheTokenForWauthAction.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/CacheTokenForWauthAction.java @@ -26,13 +26,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Component; import org.springframework.util.Assert; import org.springframework.webflow.execution.RequestContext; /** * This class is responsible to cache IDP token. */ - +@Component public class CacheTokenForWauthAction { private static final String IDP_CONFIG = "idpConfig"; http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/HomeRealmReminder.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/HomeRealmReminder.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/HomeRealmReminder.java index 51522ca..c755ebf 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/HomeRealmReminder.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/HomeRealmReminder.java @@ -21,10 +21,10 @@ package org.apache.cxf.fediz.service.idp.beans; import javax.servlet.http.Cookie; import org.apache.cxf.fediz.service.idp.util.WebUtils; +import org.springframework.stereotype.Component; import org.springframework.webflow.execution.RequestContext; -/** - */ +@Component public class HomeRealmReminder { public static final String FEDIZ_HOME_REALM = "FEDIZ_HOME_REALM"; http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/LogoutAction.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/LogoutAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/LogoutAction.java index 8cc3ecf..b17de18 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/LogoutAction.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/LogoutAction.java @@ -24,12 +24,13 @@ import org.apache.cxf.fediz.service.idp.util.WebUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Component; import org.springframework.webflow.execution.RequestContext; /** * This class is responsible to clear security context and invalidate IDP session. */ - +@Component public class LogoutAction { private static final Logger LOG = LoggerFactory.getLogger(LogoutAction.class); http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ProcessHRDSExpressionAction.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ProcessHRDSExpressionAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ProcessHRDSExpressionAction.java index 5389247..e7a9296 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ProcessHRDSExpressionAction.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/ProcessHRDSExpressionAction.java @@ -22,17 +22,17 @@ import org.apache.cxf.fediz.service.idp.domain.Idp; import org.apache.cxf.fediz.service.idp.util.WebUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import org.springframework.webflow.execution.RequestContext; /** * This class is responsible to process Home Realm Discovery Service Expression. */ - +@Component public class ProcessHRDSExpressionAction { private static final String IDP_CONFIG = "idpConfig"; - private static final Logger LOG = LoggerFactory - .getLogger(ProcessHRDSExpressionAction.class); + private static final Logger LOG = LoggerFactory.getLogger(ProcessHRDSExpressionAction.class); public String submit(RequestContext context) { Idp idpConfig = (Idp)WebUtils.getAttributeFromFlowScope(context, IDP_CONFIG); http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/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 41cac31..a357895 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 @@ -31,8 +31,10 @@ import org.apache.cxf.fediz.service.idp.domain.Idp; import org.apache.cxf.fediz.service.idp.util.WebUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import org.springframework.webflow.execution.RequestContext; +@Component public class SigninParametersCacheAction { //todo introduce constants class? http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/TrustedIdpProtocolAction.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/TrustedIdpProtocolAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/TrustedIdpProtocolAction.java index d1479c5..2369bae 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/TrustedIdpProtocolAction.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/TrustedIdpProtocolAction.java @@ -26,24 +26,22 @@ import org.apache.cxf.fediz.service.idp.protocols.ProtocolController; import org.apache.cxf.fediz.service.idp.spi.TrustedIdpProtocolHandler; import org.apache.cxf.fediz.service.idp.util.WebUtils; import org.apache.cxf.ws.security.tokenstore.SecurityToken; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Component; import org.springframework.webflow.execution.RequestContext; /** * This class is responsible to clear security context and invalidate IDP session. */ - +@Component public class TrustedIdpProtocolAction { private static final Logger LOG = LoggerFactory.getLogger(TrustedIdpProtocolAction.class); private static final String IDP_CONFIG = "idpConfig"; - @Autowired // Qualifier workaround. See http://www.jayway.com/2013/11/03/spring-and-autowiring-of-generic-types/ http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/WfreshParser.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/WfreshParser.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/WfreshParser.java index 3fba1c8..d7f03d6 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/WfreshParser.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/WfreshParser.java @@ -24,12 +24,13 @@ import org.apache.cxf.fediz.service.idp.util.WebUtils; import org.apache.cxf.ws.security.tokenstore.SecurityToken; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import org.springframework.webflow.execution.RequestContext; /** * This class is responsible to parse 'wfresh' parameter */ - +@Component public class WfreshParser { private static final Logger LOG = LoggerFactory http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-request.xml ---------------------------------------------------------------------- diff --git a/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-request.xml b/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-request.xml index 1231444..fc44654 100644 --- a/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-request.xml +++ b/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-request.xml @@ -182,7 +182,7 @@ - + http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-response.xml ---------------------------------------------------------------------- diff --git a/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-response.xml b/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-response.xml index e060b46..9e6d342 100644 --- a/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-response.xml +++ b/services/idp/src/main/webapp/WEB-INF/flows/federation-signin-response.xml @@ -32,7 +32,7 @@ - + http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/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 d8ebd2d..cff2962 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 @@ - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/services/idp/src/main/webapp/WEB-INF/idp-servlet.xml ---------------------------------------------------------------------- diff --git a/services/idp/src/main/webapp/WEB-INF/idp-servlet.xml b/services/idp/src/main/webapp/WEB-INF/idp-servlet.xml index 1d80557..003969a 100644 --- a/services/idp/src/main/webapp/WEB-INF/idp-servlet.xml +++ b/services/idp/src/main/webapp/WEB-INF/idp-servlet.xml @@ -33,114 +33,75 @@ http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd"> - + - - + + + + + + + - + + + + + + - + - + + + + + + + + + + + + + + + - + - - - + + + - + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/def5708e/systests/federation/wsfed/src/test/resources/realmb/idp-servlet.xml ---------------------------------------------------------------------- diff --git a/systests/federation/wsfed/src/test/resources/realmb/idp-servlet.xml b/systests/federation/wsfed/src/test/resources/realmb/idp-servlet.xml index cd6103c..0a68517 100644 --- a/systests/federation/wsfed/src/test/resources/realmb/idp-servlet.xml +++ b/systests/federation/wsfed/src/test/resources/realmb/idp-servlet.xml @@ -113,23 +113,4 @@ value="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0" /> - - - - - - - - - - - - - -