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 2014/04/29 23:12:54 UTC
git commit: Minor update to OAuth2 token service
Repository: cxf
Updated Branches:
refs/heads/master 8cc74d421 -> 713410ebe
Minor update to OAuth2 token service
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/713410eb
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/713410eb
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/713410eb
Branch: refs/heads/master
Commit: 713410ebe462199dccf1b98d6f6c422dd258196b
Parents: 8cc74d4
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Tue Apr 29 22:12:32 2014 +0100
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Tue Apr 29 22:12:32 2014 +0100
----------------------------------------------------------------------
.../cxf/rs/security/oauth2/services/AbstractTokenService.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/713410eb/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 9f2330a..5c07464 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
@@ -58,7 +58,7 @@ public class AbstractTokenService extends AbstractOAuthService {
if (params.containsKey(OAuthConstants.CLIENT_ID)) {
// Both client_id and client_secret are expected in the form payload
- client = getAndValidateClient(params.getFirst(OAuthConstants.CLIENT_ID),
+ client = getAndValidateClientFromIdAndSecret(params.getFirst(OAuthConstants.CLIENT_ID),
params.getFirst(OAuthConstants.CLIENT_SECRET));
} else if (sc.getUserPrincipal() != null) {
// Client has already been authenticated
@@ -97,7 +97,7 @@ public class AbstractTokenService extends AbstractOAuthService {
}
// Get the Client and check the id and secret
- protected Client getAndValidateClient(String clientId, String clientSecret) {
+ protected Client getAndValidateClientFromIdAndSecret(String clientId, String clientSecret) {
Client client = getClient(clientId);
if (clientSecret != null
&& (client.getClientCredential().getType() == null
@@ -122,7 +122,7 @@ public class AbstractTokenService extends AbstractOAuthService {
String[] parts = AuthorizationUtils.getAuthorizationParts(getMessageContext());
if (OAuthConstants.BASIC_SCHEME.equalsIgnoreCase(parts[0])) {
String[] authInfo = AuthorizationUtils.getBasicAuthParts(parts[1]);
- return getAndValidateClient(authInfo[0], authInfo[1]);
+ return getAndValidateClientFromIdAndSecret(authInfo[0], authInfo[1]);
} else {
return null;
}