cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject 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
Date Mon, 14 Jul 2014 09:22:03 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 07e0e9c45 -> 95743fcfc


[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/95743fcf
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/95743fcf
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/95743fcf

Branch: refs/heads/2.7.x-fixes
Commit: 95743fcfceee9838a86b4b5324124256198fd4e5
Parents: 07e0e9c
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Sun Jul 13 19:35:22 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Mon Jul 14 10:21:42 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/95743fcf/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/95743fcf/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 b3cbed5..1ef2f7d 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
@@ -115,7 +115,7 @@ public class OAuthRequestFilter extends AbstractAccessTokenValidator implements
         oauthContext.setClientId(accessTokenV.getClientId());
         oauthContext.setTokenKey(accessTokenV.getTokenKey());
         oauthContext.setTokenAudience(accessTokenV.getAudience());
-        
+        oauthContext.setTokenRequestParts(authParts);
         m.setContent(OAuthContext.class, oauthContext);
     }
 


Mime
View raw message