cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing a typo in one JPA code queries
Date Fri, 08 Apr 2016 13:15:09 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 4b15b8a49 -> d54b8750a


Fixing a typo in one JPA code queries


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

Branch: refs/heads/3.1.x-fixes
Commit: d54b8750a256a4ea6baf6470928bd28cb8f7c9d4
Parents: 4b15b8a
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Apr 8 14:13:54 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Apr 8 14:14:52 2016 +0100

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java | 2 +-
 .../rs/security/oauth2/grants/code/JPACodeDataProviderTest.java | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d54b8750/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
index ba7a11a..d582fcf 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
@@ -82,7 +82,7 @@ public class JPACodeDataProvider extends JPAOAuthDataProvider implements
Authori
                 + resourceOwnerSubject.getLogin() + "'", ServerAuthorizationCodeGrant.class);
         } else if (resourceOwnerSubject == null) {
             return getEntityManager().createQuery(
-                "SELECT code FROM " + CODE_TABLE_NAME + " code JOIN code.cliednt c WHERE
c.clientId = '" 
+                "SELECT code FROM " + CODE_TABLE_NAME + " code JOIN code.client c WHERE c.clientId
= '" 
                     + c.getClientId() + "'", ServerAuthorizationCodeGrant.class);
         } else {
             return getEntityManager().createQuery(

http://git-wip-us.apache.org/repos/asf/cxf/blob/d54b8750/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProviderTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProviderTest.java
b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProviderTest.java
index 8bb74aa..3878fff 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProviderTest.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProviderTest.java
@@ -76,6 +76,11 @@ public class JPACodeDataProviderTest extends Assert {
         assertEquals(1, grants.size());
         assertEquals(grant.getCode(), grants.get(0).getCode());
         
+        grants = provider.getCodeGrants(c, null);
+        assertNotNull(grants);
+        assertEquals(1, grants.size());
+        assertEquals(grant.getCode(), grants.get(0).getCode());
+        
         ServerAuthorizationCodeGrant grant2 = provider.removeCodeGrant(grant.getCode());
         assertEquals(grant.getCode(), grant2.getCode());
     }


Mime
View raw message