Repository: cxf
Updated Branches:
  refs/heads/master 5f4c6f8f4 -> 1844f802d


Minor update to oAuth2 utils


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1844f802
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1844f802
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1844f802

Branch: refs/heads/master
Commit: 1844f802d41c533783996bdabf0541a4e02b021a
Parents: 5f4c6f8
Author: Sergey Beryozkin <[email protected]>
Authored: Wed Oct 28 16:37:13 2015 +0000
Committer: Sergey Beryozkin <[email protected]>
Committed: Wed Oct 28 16:37:13 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1844f802/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
index 1560830..c96de44 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
@@ -131,7 +131,7 @@ public final class OAuthUtils {
     public static boolean isGrantSupportedForClient(Client client, 
                                                     boolean 
canSupportPublicClients, 
                                                     String grantType) {
-        if (!client.isConfidential() && !canSupportPublicClients) {
+        if (grantType == null || !client.isConfidential() && 
!canSupportPublicClients) {
             return false;
         }
         List<String> allowedGrants = client.getAllowedGrantTypes();

Reply via email to