cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/3] cxf git commit: Fixing backmerge
Date Mon, 18 May 2015 17:05:54 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes a9c4ec363 -> 816af111b


Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: 816af111b50833353d29a066ceed592429f6304b
Parents: 84b37ad
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon May 18 18:05:30 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon May 18 18:05:50 2015 +0100

----------------------------------------------------------------------
 .../SecureConversationInInterceptor.java        |  8 +-
 .../cxf/sts/cache/AbstractIdentityCache.java    |  2 +-
 .../cxf/sts/cache/EHCacheIdentityCache.java     | 77 --------------------
 .../cxf/sts/cache/MemoryIdentityCache.java      | 77 --------------------
 4 files changed, 3 insertions(+), 161 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/816af111/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
index 1b08acc..99a11b3 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
@@ -547,14 +547,10 @@ class SecureConversationInInterceptor extends AbstractPhaseInterceptor<SoapMessa
                     }
                     
                     client.cancelSecurityToken(tok);
-<<<<<<< HEAD
-                    NegotiationUtils.getTokenStore(m2).remove(tok.getId());
-=======
-                    TokenStore tokenStore = TokenStoreUtils.getTokenStore(m2);
+                    TokenStore tokenStore = NegotiationUtils.getTokenStore(m2);
                     if (tokenStore != null) {
                         tokenStore.remove(tok.getId());
                     }
->>>>>>> 591e5d9... Some code cleanup + fixes
                     m2.put(SecurityConstants.TOKEN, null);
                 } catch (RuntimeException e) {
                     throw e;
@@ -576,4 +572,4 @@ class SecureConversationInInterceptor extends AbstractPhaseInterceptor<SoapMessa
     
 
     
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/816af111/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/AbstractIdentityCache.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/AbstractIdentityCache.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/AbstractIdentityCache.java
index 4c3ef25..53d7df8 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/AbstractIdentityCache.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/AbstractIdentityCache.java
@@ -101,7 +101,7 @@ public abstract class AbstractIdentityCache implements IdentityCache,
IdentityMa
             // Identities object NOT found for key sourceUser@sourceRealm
             targetPrincipal = this.identityMapper.mapPrincipal(
                     sourceRealm, sourcePrincipal, targetRealm);
-            identities = new HashMap<>();
+            identities = new HashMap<String, String>();
             identities.put(sourceRealm, sourcePrincipal.getName());
             identities.put(targetRealm, targetPrincipal.getName());
             this.add(targetPrincipal.getName(), targetRealm, identities);

http://git-wip-us.apache.org/repos/asf/cxf/blob/816af111/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java
index 256ac54..f0591e0 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java
@@ -135,83 +135,6 @@ public class EHCacheIdentityCache extends AbstractIdentityCache
         return this.cache.toString();
     }
 
-<<<<<<< HEAD
-    @Override
-    public Principal mapPrincipal(String sourceRealm,
-            Principal sourcePrincipal, String targetRealm) {
-        
-        Principal targetPrincipal = null;
-        Map<String, String> identities = this.get(sourcePrincipal.getName(), sourceRealm);
-        if (identities != null) {
-            if (LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Identities found for '" + sourcePrincipal.getName() + "@" + sourceRealm
+ "'");
-            }
-            // Identities object found for key sourceUser@sourceRealm
-            String targetUser = identities.get(targetRealm);
-            if (targetUser == null) {
-                getStatistics().increaseCacheMiss();
-                if (LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No mapping found for realm " + targetRealm + " of user '"
-                             + sourcePrincipal.getName() + "@" + sourceRealm + "'");
-                }
-                // User identity of target realm not cached yet
-                targetPrincipal = this.identityMapper.mapPrincipal(
-                        sourceRealm, sourcePrincipal, targetRealm);
-                // Add the identity for target realm to the cached entry 
-                identities.put(targetRealm, targetPrincipal.getName());
-                
-                // Verify whether target user has cached some identities already
-                Map<String, String> cachedItem = this.get(targetPrincipal.getName(),
targetRealm);
-                if (cachedItem != null) {
-                    if (LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Merging mappings for '" + sourcePrincipal.getName() + "@"
+ sourceRealm + "'");
-                    }
-                    //Identites already cached for targetUser@targetRealm key pair
-                    //Merge into identities object
-                    this.mergeMap(identities, cachedItem);
-                }
-                this.add(targetPrincipal.getName(), targetRealm, identities);
-            } else {
-                getStatistics().increaseCacheHit();
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Mapping '" + sourcePrincipal.getName() + "@" + sourceRealm
+ "' to '"
-                             + targetUser + "@" + targetRealm + "' cached");
-                }
-                targetPrincipal = new CustomTokenPrincipal(targetUser);
-            }
-            
-        } else {
-            if (LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No mapping found for realm " + targetRealm + " of user '"
-                        + sourcePrincipal.getName() + "@" + sourceRealm + "'");
-            }
-            getStatistics().increaseCacheMiss();
-            
-            // Identities object NOT found for key sourceUser@sourceRealm
-            targetPrincipal = this.identityMapper.mapPrincipal(
-                    sourceRealm, sourcePrincipal, targetRealm);
-            identities = new HashMap<String, String>();
-            identities.put(sourceRealm, sourcePrincipal.getName());
-            identities.put(targetRealm, targetPrincipal.getName());
-            this.add(targetPrincipal.getName(), targetRealm, identities);
-            this.add(sourcePrincipal.getName(), sourceRealm, identities);
-        }
-        return targetPrincipal;
-    }
-    
-    
-    
-    private void mergeMap(Map<String, String> to, Map<String, String> from) {
-        for (String key : from.keySet()) {
-            to.put(key, from.get(key));
-        }
-        for (String key : to.keySet()) {
-            from.put(key, to.get(key));
-        }
-    }
-    
-=======
->>>>>>> 591e5d9... Some code cleanup + fixes
     public void close() {
         if (cacheManager != null) {
             // this step is especially important for global shared cache manager

http://git-wip-us.apache.org/repos/asf/cxf/blob/816af111/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/MemoryIdentityCache.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/MemoryIdentityCache.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/MemoryIdentityCache.java
index b084a51..358efbb 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/MemoryIdentityCache.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/MemoryIdentityCache.java
@@ -116,83 +116,6 @@ public class MemoryIdentityCache extends AbstractIdentityCache {
         return this.cache.toString();
     }
 
-<<<<<<< HEAD
-    @Override
-    public Principal mapPrincipal(String sourceRealm,
-            Principal sourcePrincipal, String targetRealm) {
-        
-        Principal targetPrincipal = null;
-        Map<String, String> identities = this.get(sourcePrincipal.getName(), sourceRealm);
-        if (identities != null) {
-            if (LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Identities found for '" + sourcePrincipal.getName() + "@" + sourceRealm
+ "'");
-            }
-            // Identities object found for key sourceUser@sourceRealm
-            String targetUser = identities.get(targetRealm);
-            if (targetUser == null) {
-                getStatistics().increaseCacheMiss();
-                if (LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No mapping found for realm " + targetRealm + " of user '"
-                             + sourcePrincipal.getName() + "@" + sourceRealm + "'");
-                }
-                // User identity of target realm not cached yet
-                targetPrincipal = this.identityMapper.mapPrincipal(
-                        sourceRealm, sourcePrincipal, targetRealm);
-                // Add the identity for target realm to the cached entry 
-                identities.put(targetRealm, targetPrincipal.getName());
-                
-                // Verify whether target user has cached some identities already
-                Map<String, String> cachedItem = this.get(targetPrincipal.getName(),
targetRealm);
-                if (cachedItem != null) {
-                    if (LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Merging mappings for '" + sourcePrincipal.getName() + "@"
+ sourceRealm + "'");
-                    }
-                    //Identites already cached for targetUser@targetRealm key pair
-                    //Merge into identities object
-                    this.mergeMap(identities, cachedItem);
-                }
-                this.add(targetPrincipal.getName(), targetRealm, identities);
-            } else {
-                getStatistics().increaseCacheHit();
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Mapping '" + sourcePrincipal.getName() + "@" + sourceRealm
+ "' to '"
-                             + targetUser + "@" + targetRealm + "' cached");
-                }
-                targetPrincipal = new CustomTokenPrincipal(targetUser);
-            }
-            
-        } else {
-            if (LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No mapping found for realm " + targetRealm + " of user '"
-                        + sourcePrincipal.getName() + "@" + sourceRealm + "'");
-            }
-            getStatistics().increaseCacheMiss();
-            
-            // Identities object NOT found for key sourceUser@sourceRealm
-            targetPrincipal = this.identityMapper.mapPrincipal(
-                    sourceRealm, sourcePrincipal, targetRealm);
-            identities = new HashMap<String, String>();
-            identities.put(sourceRealm, sourcePrincipal.getName());
-            identities.put(targetRealm, targetPrincipal.getName());
-            this.add(targetPrincipal.getName(), targetRealm, identities);
-            this.add(sourcePrincipal.getName(), sourceRealm, identities);
-        }
-        return targetPrincipal;
-    }
-    
-    
-    
-    private void mergeMap(Map<String, String> to, Map<String, String> from) {
-        for (String key : from.keySet()) {
-            to.put(key, from.get(key));
-        }
-        for (String key : to.keySet()) {
-            from.put(key, to.get(key));
-        }
-    }
-    
-=======
->>>>>>> 591e5d9... Some code cleanup + fixes
     public ObjectName getObjectName() throws JMException {
         StringBuilder buffer = new StringBuilder();
         buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME).append(':');


Mime
View raw message