Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E482A11C08 for ; Mon, 14 Jul 2014 09:22:03 +0000 (UTC) Received: (qmail 29434 invoked by uid 500); 14 Jul 2014 09:22:03 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 29370 invoked by uid 500); 14 Jul 2014 09:22:03 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 29361 invoked by uid 99); 14 Jul 2014 09:22:03 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2014 09:22:03 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 62B298BD58B; Mon, 14 Jul 2014 09:22:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <9df9e91593c04f3091beed3b36b6cff9@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Sun Jul 13 19:35:22 2014 +0100 Committer: Sergey Beryozkin 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); }