Repository: cxf Updated Branches: refs/heads/master 0b8ac3e0e -> 79f590ee8
Use client id instead of principal name if it's available Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/79f590ee Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/79f590ee Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/79f590ee Branch: refs/heads/master Commit: 79f590ee8f51943aa95a9e6e245f906be85d6fbb Parents: c5413a8 Author: Colm O hEigeartaigh <cohei...@apache.org> Authored: Fri Nov 13 12:25:57 2015 +0000 Committer: Colm O hEigeartaigh <cohei...@apache.org> Committed: Fri Nov 13 12:39:30 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/79f590ee/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 29eadcb..61e3165 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 @@ -65,12 +65,12 @@ public class AbstractTokenService extends AbstractOAuthService { client = getAndValidateClientFromIdAndSecret(clientId, params.getFirst(OAuthConstants.CLIENT_SECRET)); } - } else if (principal.getName() != null) { - client = getClient(principal.getName()); } else { String clientId = retrieveClientId(params); if (clientId != null) { client = getClient(clientId); + } else if (principal.getName() != null) { + client = getClient(principal.getName()); } } if (client == null) {