cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1456901 - /cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/
Date Fri, 15 Mar 2013 11:24:43 GMT
Author: coheigea
Date: Fri Mar 15 11:24:43 2013
New Revision: 1456901

URL: http://svn.apache.org/r1456901
Log:
Fixing build

Modified:
    cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
    cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
    cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationOutInterceptor.java
    cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenOutInterceptor.java

Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java?rev=1456901&r1=1456900&r2=1456901&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
Fri Mar 15 11:24:43 2013
@@ -389,50 +389,6 @@ public class IssuedTokenInterceptorProvi
             client.setTrust(getTrust10(aim));
             client.setTrust(getTrust13(aim));
             client.setTemplate(itok.getRstTemplate());
-<<<<<<< HEAD
-=======
-            Element policy = itok.getPolicy();
-            if (policy != null && policy.getNamespaceURI() != null) {
-                client.setWspNamespace(policy.getNamespaceURI());
-            }
-            if (maps != null && maps.getNamespaceURI() != null) {
-                client.setAddressingNamespace(maps.getNamespaceURI());
-            }
-            if (itok.getClaims() != null) {
-                client.setClaims(itok.getClaims());
-            }
-            return client.requestSecurityToken(appliesTo);
-        }
-        
-        private SecurityToken renewToken(
-            Message message, 
-            AssertionInfoMap aim,
-            IssuedToken itok,
-            SecurityToken tok
-        ) {
-            // If the token has not expired then we don't need to renew it
-            if (!tok.isExpired()) {
-                return tok;
-            }
-            
-            // Remove token from cache
-            message.getExchange().get(Endpoint.class).remove(SecurityConstants.TOKEN);
-            message.getExchange().get(Endpoint.class).remove(SecurityConstants.TOKEN_ID);
-            message.getExchange().remove(SecurityConstants.TOKEN_ID);
-            message.getExchange().remove(SecurityConstants.TOKEN);
-            NegotiationUtils.getTokenStore(message).remove(tok.getId());
-            
-            // If the user has explicitly disabled Renewing then we can't renew a token,
-            // so just get a new one
-            STSClient client = STSUtils.getClient(message, "sts", itok);
-            if (!client.isAllowRenewing()) {
-                return issueToken(message, aim, itok);
-            }
-            
-            AddressingProperties maps =
-                (AddressingProperties)message
-                    .get("javax.xml.ws.addressing.context.outbound");
->>>>>>> 5b53eba... Merged revisions 1456878 via  git cherry-pick from
             if (maps == null) {
                 return client.requestSecurityToken();
             } else {
@@ -440,7 +396,6 @@ public class IssuedTokenInterceptorProvi
                 return client.requestSecurityToken(appliesTo);
             }
         }
-        
     }
     
     static class IssuedTokenInInterceptor extends AbstractPhaseInterceptor<Message>
{

Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java?rev=1456901&r1=1456900&r2=1456901&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
Fri Mar 15 11:24:43 2013
@@ -99,31 +99,11 @@ public class KerberosTokenInterceptorPro
                     return;
                 }
                 if (isRequestor(message)) {
-<<<<<<< HEAD
-                    SecurityToken tok = (SecurityToken)message.getContextualProperty(SecurityConstants.TOKEN);
-                    if (tok == null) {
-                        String tokId = (String)message.getContextualProperty(SecurityConstants.TOKEN_ID);
-                        if (tokId != null) {
-                            tok = getTokenStore(message).getToken(tokId);
-                        }
-                    }
-                    if (tok == null) {
-                        try {
-                            KerberosClient client = KerberosUtils.getClient(message, "kerberos");
-                            synchronized (client) {
-                                tok = client.requestSecurityToken();
-                            }
-                        } catch (RuntimeException e) {
-                            throw e;
-                        } catch (Exception e) {
-                            throw new Fault(e);
-=======
                     SecurityToken tok = null;
                     try {
                         KerberosClient client = KerberosUtils.getClient(message, "kerberos");
                         synchronized (client) {
                             tok = client.requestSecurityToken();
->>>>>>> 5b53eba... Merged revisions 1456878 via  git cherry-pick from
                         }
                     } catch (RuntimeException e) {
                         throw e;

Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationOutInterceptor.java?rev=1456901&r1=1456900&r2=1456901&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationOutInterceptor.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationOutInterceptor.java
Fri Mar 15 11:24:43 2013
@@ -105,7 +105,7 @@ class SecureConversationOutInterceptor e
         message.getExchange().get(Endpoint.class).remove(SecurityConstants.TOKEN_ID);
         message.getExchange().remove(SecurityConstants.TOKEN_ID);
         message.getExchange().remove(SecurityConstants.TOKEN);
-        NegotiationUtils.getTokenStore(message).remove(tok.getId());
+        NegotiationUtils.getTokenStore(message).remove(tok);
         
         STSClient client = STSUtils.getClient(message, "sct");
         AddressingProperties maps =
@@ -185,4 +185,4 @@ class SecureConversationOutInterceptor e
         }
     }
 
-}
\ No newline at end of file
+}

Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenOutInterceptor.java?rev=1456901&r1=1456900&r2=1456901&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenOutInterceptor.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenOutInterceptor.java
Fri Mar 15 11:24:43 2013
@@ -56,26 +56,19 @@ class SpnegoContextTokenOutInterceptor e
                 return;
             }
             if (isRequestor(message)) {
-<<<<<<< HEAD
                 SecurityToken tok = (SecurityToken)message.getContextualProperty(SecurityConstants.TOKEN);
                 if (tok == null) {
                     String tokId = (String)message.getContextualProperty(SecurityConstants.TOKEN_ID);
                     if (tokId != null) {
                         tok = NegotiationUtils.getTokenStore(message).getToken(tokId);
-=======
-                String tokId = (String)message.getContextualProperty(SecurityConstants.TOKEN_ID);
-                SecurityToken tok = null;
-                if (tokId != null) {
-                    tok = NegotiationUtils.getTokenStore(message).getToken(tokId);
-                    
-                    if (tok != null && tok.isExpired()) {
-                        message.getExchange().get(Endpoint.class).remove(SecurityConstants.TOKEN_ID);
-                        message.getExchange().remove(SecurityConstants.TOKEN_ID);
-                        NegotiationUtils.getTokenStore(message).remove(tokId);
-                        tok = null;
->>>>>>> 5b53eba... Merged revisions 1456878 via  git cherry-pick from
                     }
                 }
+                if (tok != null && tok.isExpired()) {
+                    message.getExchange().get(Endpoint.class).remove(SecurityConstants.TOKEN_ID);
+                    message.getExchange().remove(SecurityConstants.TOKEN_ID);
+                    NegotiationUtils.getTokenStore(message).remove(tok);
+                    tok = null;
+                }
                 
                 if (tok == null) {
                     tok = issueToken(message, aim);
@@ -160,4 +153,4 @@ class SpnegoContextTokenOutInterceptor e
         }
     }
     
-}
\ No newline at end of file
+}



Mime
View raw message