cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf-fediz git commit: Consolidating applicationContext in the OIDC systests
Date Fri, 28 Oct 2016 11:20:09 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 69034b82c -> 47c11c804


Consolidating applicationContext in the OIDC systests


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/47c11c80
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/47c11c80
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/47c11c80

Branch: refs/heads/master
Commit: 47c11c8041f686c22ebe91cfc5afa248b37c5b08
Parents: 69034b8
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Oct 28 12:19:55 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Oct 28 12:19:55 2016 +0100

----------------------------------------------------------------------
 .../test/resources/oidc/applicationContext.xml  | 37 ++++++++++++++++++--
 1 file changed, 34 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/47c11c80/systests/oidc/src/test/resources/oidc/applicationContext.xml
----------------------------------------------------------------------
diff --git a/systests/oidc/src/test/resources/oidc/applicationContext.xml b/systests/oidc/src/test/resources/oidc/applicationContext.xml
index 2eefe27..3120c5d 100644
--- a/systests/oidc/src/test/resources/oidc/applicationContext.xml
+++ b/systests/oidc/src/test/resources/oidc/applicationContext.xml
@@ -101,6 +101,7 @@
            <ref bean="oidcKeysService"/>
         </jaxrs:serviceBeans>
         <jaxrs:providers>
+            <ref bean="corsFilter"/>
             <bean class="org.apache.cxf.rs.security.jose.jaxrs.JsonWebKeysProvider"/>
         </jaxrs:providers>
         <jaxrs:properties>
@@ -125,6 +126,7 @@
            <ref bean="userInfoService"/>
         </jaxrs:serviceBeans>
         <jaxrs:providers>
+            <ref bean="corsFilter"/>
             <bean class="org.apache.cxf.jaxrs.provider.json.JsonMapObjectProvider"/>
             <ref bean="oauth2TokenValidationFilter"/>
         </jaxrs:providers>
@@ -184,19 +186,37 @@
         <property name="signWithClientSecret" value="true"/>
       -->
     </bean>
+    <!-- Cors filter for endpoints used by implicit flow (by js clients) -->
+    <util:list id="implicitFlowAllowHeaders">
+        <value>Authorization</value>
+    </util:list>
+    <bean id="corsFilter" class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter">
+        <property name="allowHeaders" ref="implicitFlowAllowHeaders"/>
+    </bean>
     <bean id="refreshTokenHandler" class="org.apache.cxf.rs.security.oauth2.grants.refresh.RefreshTokenGrantHandler">
         <property name="dataProvider" ref="oauthProvider"/>
     </bean>
-     <bean id="clientCredsHandler" class="org.apache.cxf.rs.security.oauth2.grants.clientcred.ClientCredentialsGrantHandler">
+    
+    <bean id="clientCredsHandler" class="org.apache.cxf.rs.security.oauth2.grants.clientcred.ClientCredentialsGrantHandler">
         <property name="dataProvider" ref="oauthProvider"/>
     </bean>
+        
+    <util:list id="grantHandlers">
+        <ref bean="refreshTokenHandler"/>
+        <!-- Add more custom grant handlers as needed -->
+        <ref bean="clientCredsHandler"/>
+    </util:list>
     <!-- Access Token service -->
     <bean id="accessTokenService" class="org.apache.cxf.rs.security.oauth2.services.AccessTokenService">
         <property name="dataProvider" ref="oauthProvider"/>
         <property name="responseFilter" ref="idTokenFilter"/>
-        <property name="grantHandler" ref="clientCredsHandler"/>
+        <property name="grantHandlers" ref="grantHandlers"/>
         <property name="canSupportPublicClients" value="true"/>
     </bean>
+    <!-- Access Token Revocation service -->
+    <bean id="accessTokenRevocationService" class="org.apache.cxf.rs.security.oauth2.services.TokenRevocationService">
+        <property name="dataProvider" ref="oauthProvider"/>
+    </bean>
     <!-- Access Token Introspection service -->
     <bean id="accessTokenIntrospectionService" class="org.apache.cxf.rs.security.oauth2.services.TokenIntrospectionService">
         <property name="dataProvider" ref="oauthProvider"/>
@@ -207,6 +227,7 @@
         <jaxrs:serviceBeans>
             <ref bean="accessTokenService"/>
             <ref bean="accessTokenIntrospectionService"/>
+            <ref bean="accessTokenRevocationService"/>
         </jaxrs:serviceBeans>
         <jaxrs:providers>
            <ref bean="oauthJsonProvider"/>
@@ -216,7 +237,17 @@
             <entry key="rs.security.signature.key.password.provider" value-ref="keyPasswordProvider"/>
         </jaxrs:properties>
      </jaxrs:server>
-     
+    
+     <!-- .well-known OIDC Configuration Service --> 
+     <bean id="oidcConfigService" class="org.apache.cxf.rs.security.oidc.idp.OidcConfigurationService"/>
+     <jaxrs:server address="/.well-known">
+        <jaxrs:serviceBeans>
+            <ref bean="oidcConfigService"/>
+        </jaxrs:serviceBeans>
+        <jaxrs:properties>
+            <entry key="rs.security.signature.properties" value="rs.security.properties"/>
+        </jaxrs:properties>
+     </jaxrs:server>
      <http:conduit name="*.http-conduit">
         <http:tlsClientParameters
             disableCNCheck="true">


Mime
View raw message