[java-identity-provider COMMIT] in /trunk: idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relying...

noreply at shibboleth.net noreply at shibboleth.net
Wed Jul 30 04:16:19 EDT 2014


Author: rdw
Date: Wed Jul 30 04:16:18 2014
New Revision: 6361

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6361&view=rev
Log:
IDP401 Remove the embedded spring beans from the syntax for relying party

Modified:
    trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAMLProfileConfigurationParser.java
    trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/SAML2SSOSProfileParser.java
    trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/saml/LogoutTest.java
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/beans.xml
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/saml/logoutValues.xml
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/saml/saml2artifact.xml
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/saml/ssosValues.xml
    trunk/idp-schema/src/main/resources/schema/shibboleth-relying-party-saml.xsd

Modified: trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAMLProfileConfigurationParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAMLProfileConfigurationParser.java?rev=6361&r1=6360&r2=6361&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAMLProfileConfigurationParser.java (original)
+++ trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAMLProfileConfigurationParser.java Wed Jul 30 04:16:18 2014
@@ -33,7 +33,6 @@
 import org.opensaml.xmlsec.impl.BasicSignatureSigningConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.config.BeanDefinition;
 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
@@ -50,14 +49,11 @@
 public abstract class BaseSAMLProfileConfigurationParser extends AbstractSingleBeanDefinitionParser {
     
     /** Class logger. */
-    @Nonnull private Logger log = LoggerFactory.getLogger(BaseSAMLProfileConfigurationParser.class);
+    @Nonnull private final Logger log = LoggerFactory.getLogger(BaseSAMLProfileConfigurationParser.class);
 
     /** Flag controlling whether to parse artifact configuration. */
     private boolean artifactAware;
 
-    /** Where we store any <spring:beans> statements. */
-    private BeanFactory embeddedBeans;
-
     /**
      * Set whether to parse artifact configuration.
      * 
@@ -65,15 +61,6 @@
      */
     protected void setArtifactAware(final boolean flag) {
         artifactAware = flag;
-    }
-
-    /**
-     * returns the factory for any embedded beans.
-     * 
-     * @return Returns the beans.
-     */
-    @Nullable protected BeanFactory getEmbeddedBeans() {
-        return embeddedBeans;
     }
 
     /**
@@ -167,20 +154,6 @@
      * @param parserContext the parser context
      */
     private void setSecurityConfiguration(Element element, BeanDefinitionBuilder builder, ParserContext parserContext) {
-
-        if (null != getEmbeddedBeans()) {
-            // Ask the embedded beans first
-            final SecurityConfiguration configuration;
-            configuration = SpringSupport.getBean(getEmbeddedBeans(), SecurityConfiguration.class);
-            if (null != configuration) {
-                builder.addPropertyValue("securityConfiguration", configuration);
-                if (element.hasAttributeNS(null, "signingCredentialRef")) {
-                    log.warn("local beans defined, explicit signingCredentialRef is ignored");
-                }
-                return;
-            }
-            log.debug("embedded beans but no SecurityConfiguration");
-        }
 
         final String credentialRef;
         if (element.hasAttributeNS(null, "signingCredentialRef")) {
@@ -224,13 +197,6 @@
     @Override protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
         super.doParse(element, parserContext, builder);
 
-        final List<Element> springBeans =
-                ElementSupport.getChildElements(element, SpringSupport.SPRING_BEANS_ELEMENT_NAME);
-
-        if (null != springBeans && !springBeans.isEmpty()) {
-            embeddedBeans = SpringSupport.createBeanFactory(springBeans.get(0));
-        }
-
         setSecurityConfiguration(element, builder, parserContext);
 
         if (element.hasAttributeNS(null, "assertionLifetime")) {


[... 146 lines stripped ...]


More information about the commits mailing list