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 F15A318BC0 for ; Tue, 19 Jan 2016 11:40:36 +0000 (UTC) Received: (qmail 55324 invoked by uid 500); 19 Jan 2016 11:40:36 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 55260 invoked by uid 500); 19 Jan 2016 11:40:36 -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 55251 invoked by uid 99); 19 Jan 2016 11:40:36 -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; Tue, 19 Jan 2016 11:40:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 98CDEDFCB5; Tue, 19 Jan 2016 11:40:36 +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: X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: Fixing a typo in the code grant handler Date: Tue, 19 Jan 2016 11:40:36 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master a9bd49ff0 -> f11ec01ac Fixing a typo in the code grant handler Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f11ec01a Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f11ec01a Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f11ec01a Branch: refs/heads/master Commit: f11ec01ac603a7b3919ed075afc9ac35edf48c8a Parents: a9bd49f Author: Sergey Beryozkin Authored: Tue Jan 19 11:40:19 2016 +0000 Committer: Sergey Beryozkin Committed: Tue Jan 19 11:40:19 2016 +0000 ---------------------------------------------------------------------- .../oauth2/grants/code/AuthorizationCodeGrantHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/f11ec01a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java index 6d7fc1a..7e5aab3 100644 --- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java +++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java @@ -113,11 +113,11 @@ public class AuthorizationCodeGrantHandler extends AbstractGrantHandler { private boolean compareCodeVerifierWithChallenge(Client c, String clientCodeVerifier, String clientCodeChallenge) { - if (clientCodeChallenge == null && clientCodeChallenge == null + if (clientCodeChallenge == null && clientCodeVerifier == null && (c.isConfidential() || !expectCodeVerifierForPublicClients)) { return true; - } else if (clientCodeChallenge != null && clientCodeChallenge == null - || clientCodeChallenge == null && clientCodeChallenge != null) { + } else if (clientCodeChallenge != null && clientCodeVerifier == null + || clientCodeChallenge == null && clientCodeVerifier != null) { return false; } else { String transformedCodeVerifier = codeVerifierTransformer == null