cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: More updates to OAuthInvoker
Date Tue, 24 Nov 2015 14:17:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c0fd11fa0 -> 9f808d2f2


More updates to OAuthInvoker


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

Branch: refs/heads/3.1.x-fixes
Commit: 9f808d2f250b0323c99c215b18054ffecbdde813
Parents: c0fd11f
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Nov 24 14:16:50 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Nov 24 14:17:32 2015 +0000

----------------------------------------------------------------------
 .../rs/security/oauth2/client/ClientCodeRequestFilter.java  | 1 -
 .../apache/cxf/rs/security/oauth2/client/OAuthInvoker.java  | 9 ++++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9f808d2f/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
index daaf121..0aa2347 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
@@ -195,7 +195,6 @@ public class ClientCodeRequestFilter implements ContainerRequestFilter
{
         ClientTokenContext tokenContext = initializeClientTokenContext(rc, at, state);
         if (at != null && clientTokenContextManager != null) {
             clientTokenContextManager.setClientTokenContext(mc, tokenContext);
-            JAXRSUtils.getCurrentMessage().setContent(ClientTokenContextManager.class, clientTokenContextManager);
         }
         setClientCodeRequest(tokenContext);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/9f808d2f/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthInvoker.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthInvoker.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthInvoker.java
index 6775b4b..8bd49ab 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthInvoker.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthInvoker.java
@@ -33,6 +33,7 @@ import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken;
 
 public class OAuthInvoker extends JAXRSInvoker {
     private WebClient accessTokenServiceClient;
+    private ClientTokenContextManager clientTokenContextManager;
     private Consumer consumer;
     @Override
     protected Object performInvocation(Exchange exchange, final Object serviceObject, Method
m,
@@ -49,11 +50,9 @@ public class OAuthInvoker extends JAXRSInvoker {
                     accessToken = OAuthClientUtils.refreshAccessToken(accessTokenServiceClient,

                                                         consumer, 
                                                         accessToken);
-                    ClientTokenContextManager contextManager = 
-                        exchange.getInMessage().getContent(ClientTokenContextManager.class);
                     MessageContext mc = new MessageContextImpl(inMessage);
                     ((ClientTokenContextImpl)tokenContext).setToken(accessToken);       
   
-                    contextManager.setClientTokenContext(mc, tokenContext);
+                    clientTokenContextManager.setClientTokenContext(mc, tokenContext);
                     
                     //retry
                     return super.performInvocation(exchange, serviceObject, m, paramArray);
@@ -71,4 +70,8 @@ public class OAuthInvoker extends JAXRSInvoker {
     public void setConsumer(Consumer consumer) {
         this.consumer = consumer;
     }
+
+    public void setClientTokenContextManager(ClientTokenContextManager clientTokenContextManager)
{
+        this.clientTokenContextManager = clientTokenContextManager;
+    }
 }


Mime
View raw message