cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Minor update to AuthorizationCodeService
Date Fri, 20 Mar 2015 14:40:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/master b4366db73 -> 3f975fa27


Minor update to AuthorizationCodeService


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

Branch: refs/heads/master
Commit: 3f975fa27caf2360ee415fb8d58ed47f753209b9
Parents: b4366db
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Mar 20 14:39:54 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Mar 20 14:39:54 2015 +0000

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/services/AccessTokenService.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3f975fa2/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
index c2bf07d..af94464 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
@@ -166,12 +166,11 @@ public class AccessTokenService extends AbstractTokenService {
                     return handler;
                 }
             }
-            // Lets try the default grant handler
-            if (grantHandlers.size() == 0) {
+            // Lets try the well-known grant handlers
+            if (super.getDataProvider() instanceof AuthorizationCodeDataProvider) {
                 AuthorizationCodeGrantHandler handler = new AuthorizationCodeGrantHandler();
                 if (handler.getSupportedGrantTypes().contains(grantType)) {
-                    handler.setDataProvider(
-                            (AuthorizationCodeDataProvider)super.getDataProvider());
+                    handler.setDataProvider((AuthorizationCodeDataProvider)super.getDataProvider());
                     return handler;
                 }
             }


Mime
View raw message