cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: CXF-6549 - JMX MBean for IdentityCache throws RuntimeOperationsException
Date Fri, 24 Mar 2017 12:04:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/master a719adcca -> a42362e39


CXF-6549 - JMX MBean for IdentityCache throws RuntimeOperationsException


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

Branch: refs/heads/master
Commit: a42362e397b84d335015f7f9aa07b4f0bfb49260
Parents: a719adc
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Mar 24 12:04:33 2017 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Mar 24 12:04:33 2017 +0000

----------------------------------------------------------------------
 .../apache/cxf/systest/sts/common/CustomIdentityMapper.java | 4 ++--
 .../org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java | 3 ++-
 .../org/apache/cxf/systest/sts/deployment/sts/realms.xml    | 9 +++++++--
 3 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a42362e3/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
index 59c8c31..5a94433 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
@@ -20,13 +20,13 @@ package org.apache.cxf.systest.sts.common;
 
 import java.security.Principal;
 
-import org.apache.cxf.sts.IdentityMapper;
+import org.apache.cxf.sts.cache.MemoryIdentityCache;
 import org.apache.wss4j.common.principal.CustomTokenPrincipal;
 
 /**
  * A test implementation of IdentityMapper.
  */
-public class CustomIdentityMapper implements IdentityMapper {
+public class CustomIdentityMapper extends MemoryIdentityCache {
 
     /**
      * Map a principal in the source realm to the target realm

http://git-wip-us.apache.org/repos/asf/cxf/blob/a42362e3/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
index c72c898..630bb43 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
@@ -388,7 +388,6 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
         bus.shutdown(true);
     }
 
-  //CHECKSTYLE:OFF
     @org.junit.Test
     public void testSAMLinWSSecToOtherRealm() throws Exception {
         SpringBusFactory bf = new SpringBusFactory();
@@ -477,6 +476,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
         return requestSecurityToken(tokenType, keyType, null, bus, endpointAddress, context,
null, null, null);
     }
 
+    // CHECKSTYLE:OFF
     private SecurityToken requestSecurityToken(
         String tokenType,
         String keyType,
@@ -533,6 +533,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
 
         return stsClient.requestSecurityToken(endpointAddress);
     }
+    // CHECKSTYLE:ON
 
     private Properties getEncryptionProperties() {
         Properties properties = new Properties();

http://git-wip-us.apache.org/repos/asf/cxf/blob/a42362e3/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
index 7ba66d2..7de1aaf 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
@@ -36,13 +36,18 @@
     </util:map>
     
     <!-- Relationships between realms -->
-    <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/>
+    <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper">
+    </bean>
+    
+    <bean id="identityCache" class="org.apache.cxf.sts.cache.MemoryIdentityCache">
+        <constructor-arg ref="identityMapper"></constructor-arg>
+    </bean>
     
     <util:list id="relationships">
         <bean class="org.apache.cxf.sts.token.realm.Relationship">
             <property name="sourceRealm" value="#{realmA.getName()}"/>
             <property name="targetRealm" value="#{realmB.getName()}"/>
-            <property name="identityMapper" ref="identityMapper"/>
+            <property name="identityMapper" ref="identityCache"/>
             <property name="type" value="FederatedIdentity"/>
         </bean>
     </util:list>


Mime
View raw message