Repository: cxf Updated Branches: refs/heads/3.1.x-fixes b3c4e25b8 -> a57148a70
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/a57148a7 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a57148a7 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a57148a7 Branch: refs/heads/3.1.x-fixes Commit: a57148a706ad47b91c5cbf01e863e32b91ad94b7 Parents: b3c4e25 Author: Sergey Beryozkin <sberyoz...@gmail.com> Authored: Fri Apr 28 13:59:25 2017 +0100 Committer: Sergey Beryozkin <sberyoz...@gmail.com> Committed: Fri Apr 28 14:02:27 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/a57148a7/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 2d041ad..ecca47b 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)