[java-identity-provider COMMIT] in /trunk: idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java...

noreply at shibboleth.net noreply at shibboleth.net
Wed Jul 23 11:44:00 EDT 2014


Author: tzeller
Date: Wed Jul 23 11:44:00 2014
New Revision: 6336

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6336&view=rev
Log:
IDP-436 Generate credentials using properties from idp.properties via Spring and provide a Windows .bat file to do so. The creds.bat and creds.sh scripts call GenerateCredentials which instantiates an application context from conf/generate-credentials.xml. Lower the abstraction level of the IdP application context initializer to work with non-web application contexts. Add initializers as a parameter to creation of new contexts in SpringSupport.

Added:
    trunk/idp-conf/src/main/resources/conf/generate-credentials.xml   (with props)
    trunk/idp-core/src/main/java/net/shibboleth/idp/GenerateCredentials.java   (with props)
    trunk/idp-distribution/src/main/resources/bin/creds.bat   (with props)
Modified:
    trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java
    trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/AttributeFilterServiceTest.java
    trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java
    trunk/idp-distribution/src/main/resources/bin/creds.sh

Modified: trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java?rev=6336&r1=6335&r2=6336&view=diff
==============================================================================
--- trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java (original)
+++ trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java Wed Jul 23 11:44:00 2014
@@ -31,6 +31,7 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.config.BeanPostProcessor;
 import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextInitializer;
 import org.springframework.core.io.FileSystemResource;
 import org.springframework.core.io.Resource;
 import org.springframework.webflow.executor.FlowExecutionResult;
@@ -130,8 +131,8 @@
             configs.add(r);
         }
                 
-        return SpringSupport.newContext(Main.class.getName(), configs, Collections.<BeanPostProcessor>emptyList(),
-                null);
+        return SpringSupport.newContext(Main.class.getName(), configs, Collections.<BeanPostProcessor> emptyList(),
+                Collections.<ApplicationContextInitializer> emptyList(), null);
     }
     
     /**

Modified: trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/AttributeFilterServiceTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/AttributeFilterServiceTest.java?rev=6336&r1=6335&r2=6336&view=diff
==============================================================================
--- trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/AttributeFilterServiceTest.java (original)
+++ trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/AttributeFilterServiceTest.java Wed Jul 23 11:44:00 2014
@@ -31,6 +31,7 @@
 import net.shibboleth.utilities.java.support.service.ServiceException;
 
 import org.springframework.beans.factory.config.BeanPostProcessor;
+import org.springframework.context.ApplicationContextInitializer;
 import org.springframework.context.support.GenericApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
@@ -63,7 +64,8 @@
         final Resource resource = new ClassPathResource(SERVICE_CONFIG_DIR + name);
         final GenericApplicationContext context =
                 SpringSupport.newContext(name, Collections.singletonList(resource),
-                        Collections.<BeanPostProcessor> emptyList(), null);
+                        Collections.<BeanPostProcessor> emptyList(),
+                        Collections.<ApplicationContextInitializer> emptyList(), null);
         final AttributeFilterServiceStrategy strategy = new AttributeFilterServiceStrategy();
         strategy.setId("ID");
         strategy.initialize();

Modified: trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java?rev=6336&r1=6335&r2=6336&view=diff
==============================================================================
--- trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java (original)
+++ trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java Wed Jul 23 11:44:00 2014
@@ -31,11 +31,11 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

[... 61 lines stripped ...]


More information about the commits mailing list