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:14:11 GMT
Repository: cxf
Updated Branches:
  refs/heads/master c01c68ddd -> fd32df1be


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/fd32df1b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/fd32df1b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/fd32df1b

Branch: refs/heads/master
Commit: fd32df1beebe2472c450389c1c204c801d760714
Parents: c01c68d
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:13:54 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/fd32df1b/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/fd32df1b/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