Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes b5609a091 -> c2d9dca13


Getting invalid_client reported


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

Branch: refs/heads/3.0.x-fixes
Commit: c2d9dca133bd44ded96b2cc2be190455c774692d
Parents: b5609a0
Author: Sergey Beryozkin <[email protected]>
Authored: Tue Nov 24 15:44:17 2015 +0000
Committer: Sergey Beryozkin <[email protected]>
Committed: Tue Nov 24 15:46:18 2015 +0000

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/services/AbstractTokenService.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c2d9dca1/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractTokenService.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractTokenService.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractTokenService.java
index 61e3165..a31fb5d 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractTokenService.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractTokenService.java
@@ -110,14 +110,14 @@ public class AbstractTokenService extends 
AbstractOAuthService {
     protected Client getAndValidateClientFromIdAndSecret(String clientId, 
String providedClientSecret) {
         Client client = getClient(clientId);
         if (!client.getClientId().equals(clientId)) {
-            throw ExceptionUtils.toNotAuthorizedException(null, null);
+            reportInvalidClient();
         }
         if (isValidPublicClient(client, clientId, providedClientSecret)) {
             return client;
         }
         if (!client.isConfidential()
             || !isConfidenatialClientSecretValid(client, 
providedClientSecret)) {
-            throw ExceptionUtils.toNotAuthorizedException(null, null);
+            reportInvalidClient();
         }
         return client;
     }

Reply via email to