[java-idp-oidc] branch master updated: Move registry system wiring into extension postconfig and fix tests.

Scott Cantor cantor.2 at osu.edu
Tue Jan 14 12:53:05 EST 2020


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository java-idp-oidc.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=10694cf02655cd73267dd55ec7df788d2178e827

The following commit(s) were added to refs/heads/master by this push:
       new  10694cf   Move registry system wiring into extension postconfig and fix tests.
10694cf is described below

commit 10694cf02655cd73267dd55ec7df788d2178e827
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jan 14 12:53:03 2020 -0500

    Move registry system wiring into extension postconfig and fix tests.
---
 .../META-INF/net.shibboleth.idp/postconfig.xml     | 35 ++++++++++++++++++++++
 .../oidc/profile/flow/AbstractOidcFlowTest.java    |  2 ++
 .../src/test/resources/conf/global-oidc.xml        | 21 -------------
 3 files changed, 37 insertions(+), 21 deletions(-)

diff --git a/idp-oidc-extension-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml b/idp-oidc-extension-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
new file mode 100644
index 0000000..62f8a86
--- /dev/null
+++ b/idp-oidc-extension-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xmlns:util="http://www.springframework.org/schema/util" xmlns:p="http://www.springframework.org/schema/p"
+    xmlns:c="http://www.springframework.org/schema/c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
+
+    default-init-method="initialize" default-destroy-method="destroy">
+
+    <!-- System beans needed for extension to function, loaded after global.xml -->
+
+    <!-- Necessary for encoder parsing and claims mapping to function, normally part of registry wiring. -->
+    
+    <bean id="OIDCByteTranscoder"
+        class="org.geant.idpextension.oidc.attribute.transcoding.impl.OIDCByteAttributeTranscoder" />
+
+    <bean id="OIDCStringTranscoder"
+        class="org.geant.idpextension.oidc.attribute.transcoding.impl.OIDCStringAttributeTranscoder" />
+
+    <bean id="OIDCScopedStringTranscoder"
+        class="org.geant.idpextension.oidc.attribute.transcoding.impl.OIDCScopedStringAttributeTranscoder" />
+
+    <bean id="OIDCExtendedNamingRegistry" parent="shibboleth.DefaultNamingRegistry">
+        <property name="sourceMap">
+            <map merge="true">
+                <entry key="#{T(net.minidev.json.JSONObject)}">
+                    <bean class="org.geant.idpextension.oidc.attribute.transcoding.AbstractOIDCAttributeTranscoder.NamingFunction" />
+                </entry>
+            </map>
+        </property>
+    </bean>
+    
+</beans>
\ No newline at end of file
diff --git a/idp-oidc-extension-impl/src/test/java/org/geant/idpextension/oidc/profile/flow/AbstractOidcFlowTest.java b/idp-oidc-extension-impl/src/test/java/org/geant/idpextension/oidc/profile/flow/AbstractOidcFlowTest.java
index 23a4696..1256550 100644
--- a/idp-oidc-extension-impl/src/test/java/org/geant/idpextension/oidc/profile/flow/AbstractOidcFlowTest.java
+++ b/idp-oidc-extension-impl/src/test/java/org/geant/idpextension/oidc/profile/flow/AbstractOidcFlowTest.java
@@ -33,6 +33,7 @@ import org.opensaml.profile.context.ProfileRequestContext;
 import org.opensaml.storage.StorageService;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.test.context.ContextConfiguration;
 import org.springframework.webflow.executor.FlowExecutionResult;
 import org.springframework.webflow.test.MockExternalContext;
 import org.testng.Assert;
@@ -56,6 +57,7 @@ import net.shibboleth.utilities.java.support.net.HttpServletRequestResponseConte
 /**
  * Abstract unit test for the OIDC flows.
  */
+ at ContextConfiguration(locations = { "classpath*:/META-INF/net.shibboleth.idp/postconfig.xml",})
 public abstract class AbstractOidcFlowTest extends AbstractFlowTest {
     
     public static final String END_STATE_ID = "CommitResponse";
diff --git a/idp-oidc-extension-impl/src/test/resources/conf/global-oidc.xml b/idp-oidc-extension-impl/src/test/resources/conf/global-oidc.xml
index 5ec508a..d1ef15a 100644
--- a/idp-oidc-extension-impl/src/test/resources/conf/global-oidc.xml
+++ b/idp-oidc-extension-impl/src/test/resources/conf/global-oidc.xml
@@ -59,25 +59,4 @@
         <value>sub</value>
     </util:list>
 
-    <!-- Necessary for encoder parsing and claims mapping to function, normally part of registry wiring. -->
-    
-    <bean id="OIDCByteTranscoder"
-        class="org.geant.idpextension.oidc.attribute.transcoding.impl.OIDCByteAttributeTranscoder" />
-
-    <bean id="OIDCStringTranscoder"
-        class="org.geant.idpextension.oidc.attribute.transcoding.impl.OIDCStringAttributeTranscoder" />
-
-    <bean id="OIDCScopedStringTranscoder"
-        class="org.geant.idpextension.oidc.attribute.transcoding.impl.OIDCScopedStringAttributeTranscoder" />
-
-    <bean id="OIDCExtendedNamingRegistry" parent="shibboleth.DefaultNamingRegistry">
-        <property name="sourceMap">
-            <map merge="true">
-                <entry key="#{T(net.minidev.json.JSONObject)}">
-                    <bean class="org.geant.idpextension.oidc.attribute.transcoding.AbstractOIDCAttributeTranscoder.NamingFunction" />
-                </entry>
-            </map>
-        </property>
-    </bean>
-    
 </beans>
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list