You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/04/28 12:59:41 UTC
cxf git commit: Removing some duplicate code
Repository: cxf
Updated Branches:
refs/heads/master 514c06899 -> ab25fa963
Removing some duplicate code
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ab25fa96
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ab25fa96
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ab25fa96
Branch: refs/heads/master
Commit: ab25fa96335d8f8e7b4e9d896fa006448b953483
Parents: 514c068
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Fri Apr 28 13:59:25 2017 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Fri Apr 28 13:59:25 2017 +0100
----------------------------------------------------------------------
.../rs/security/oauth2/services/AbstractOAuthService.java | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/ab25fa96/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java
index 63a9559..10f68a7 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java
@@ -88,14 +88,7 @@ public abstract class AbstractOAuthService {
*/
protected Client getValidClient(String clientId, MultivaluedMap<String, String> params)
throws OAuthServiceException {
- if (clientId != null) {
- mc.put(OAuthConstants.CLIENT_SECRET, params.getFirst(OAuthConstants.CLIENT_SECRET));
- mc.put(OAuthConstants.GRANT_TYPE, params.getFirst(OAuthConstants.GRANT_TYPE));
- mc.put(OAuthConstants.TOKEN_REQUEST_PARAMS, params);
- return dataProvider.getClient(clientId);
- }
- LOG.fine("No valid client found as the given clientId is null");
- return null;
+ return getValidClient(clientId, params.getFirst(OAuthConstants.CLIENT_SECRET), params);
}
protected Client getValidClient(String clientId, String clientSecret, MultivaluedMap<String, String> params)