Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c083d093c -> 1b8ab71e4


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

Branch: refs/heads/3.1.x-fixes
Commit: 1b8ab71e424e893a00bb45eb11862bc47d16dce2
Parents: c083d09
Author: Sergey Beryozkin <[email protected]>
Authored: Tue Nov 24 15:44:17 2015 +0000
Committer: Sergey Beryozkin <[email protected]>
Committed: Tue Nov 24 15:45:17 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/1b8ab71e/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