You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2014/07/13 20:35:54 UTC

git commit: [CXF-5828] Make it simpler to access OAuth2 request token details so the the code which needs does not have to parse HTTP Authorization again

Repository: cxf
Updated Branches:
  refs/heads/master 02dbc1104 -> 98340f1b5


[CXF-5828] Make it simpler to access OAuth2 request token details so the the code which needs does not have to parse HTTP Authorization again


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

Branch: refs/heads/master
Commit: 98340f1b5d04ee3a4d2c6cf6ba3ed1894817aec7
Parents: 02dbc110
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Sun Jul 13 19:35:22 2014 +0100
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Sun Jul 13 19:35:22 2014 +0100

----------------------------------------------------------------------
 .../apache/cxf/rs/security/oauth2/common/OAuthContext.java  | 9 +++++++++
 .../cxf/rs/security/oauth2/filters/OAuthRequestFilter.java  | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/98340f1b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthContext.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthContext.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthContext.java
index 70f0049..a2f5384 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthContext.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthContext.java
@@ -35,6 +35,7 @@ public class OAuthContext {
     private String clientId;
     private String tokenKey;
     private String tokenAudience;
+    private String[] tokenRequestParts;
     
     public OAuthContext(UserSubject resourceOwnerSubject,
                         UserSubject clientSubject,
@@ -118,4 +119,12 @@ public class OAuthContext {
     public void setTokenAudience(String tokenAudience) {
         this.tokenAudience = tokenAudience;
     }
+
+    public String[] getTokenRequestParts() {
+        return tokenRequestParts;
+    }
+
+    public void setTokenRequestParts(String[] tokenRequestParts) {
+        this.tokenRequestParts = tokenRequestParts;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/98340f1b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index 0342e9e..8f3f5d8 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -117,7 +117,7 @@ public class OAuthRequestFilter extends AbstractAccessTokenValidator
         oauthContext.setClientId(accessTokenV.getClientId());
         oauthContext.setTokenKey(accessTokenV.getTokenKey());
         oauthContext.setTokenAudience(accessTokenV.getAudience());
-        
+        oauthContext.setTokenRequestParts(authParts);
         m.setContent(OAuthContext.class, oauthContext);
     }