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 DA7DF18B76 for ; Mon, 9 Nov 2015 16:33:22 +0000 (UTC) Received: (qmail 32398 invoked by uid 500); 9 Nov 2015 16:33:22 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 32338 invoked by uid 500); 9 Nov 2015 16:33:22 -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 32329 invoked by uid 99); 9 Nov 2015 16:33:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Nov 2015 16:33:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A267CE045B; Mon, 9 Nov 2015 16:33:22 +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: <6697383798f0404c909ea6ebfe4d82f4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: Minor update to oauth access_denied check Date: Mon, 9 Nov 2015 16:33:22 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master 2e7d95de8 -> b71f22c12 Minor update to oauth access_denied check Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b71f22c1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b71f22c1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b71f22c1 Branch: refs/heads/master Commit: b71f22c125b4e65048caf6fdaf50496403ab57a1 Parents: 2e7d95d Author: Sergey Beryozkin Authored: Mon Nov 9 16:33:06 2015 +0000 Committer: Sergey Beryozkin Committed: Mon Nov 9 16:33:06 2015 +0000 ---------------------------------------------------------------------- .../cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/b71f22c1/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 bd49445..49df2d6 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 @@ -113,7 +113,8 @@ public class ClientCodeRequestFilter implements ContainerRequestFilter { SecurityContext sc = rc.getSecurityContext(); if (sc == null || sc.getUserPrincipal() == null) { if (codeParam == null - && requestParams.containsKey(OAuthConstants.ACCESS_DENIED) + && requestParams.containsKey(OAuthConstants.ERROR_KEY) + && OAuthConstants.ACCESS_DENIED.equals(requestParams.get(OAuthConstants.ERROR_KEY)) && !faultAccessDeniedResponses) { if (!applicationCanHandleAccessDenied) { rc.abortWith(Response.ok(new AccessDeniedResponse()).build());