You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/07/19 13:50:03 UTC
[cxf] branch 3.1.x-fixes updated (f2756fc -> 0a446ba)
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a change to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.
from f2756fc [CXF-7799] Extract queryString from AtmosphereRequest path (#430)
new 67699e7 CXF-7803 - JCache OAuthDataProvider implementation doesn't work with refresh tokens
new 0a446ba Recording .gitmergeinfo Changes
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.gitmergeinfo | 2 ++
.../cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java | 6 ++++++
.../rs/security/oauth2/provider/JCacheOAuthDataProviderTest.java | 6 ++----
3 files changed, 10 insertions(+), 4 deletions(-)
[cxf] 02/02: Recording .gitmergeinfo Changes
Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 0a446ba7e0f1c3901bf32eabcdb0cab6fd2c445d
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Jul 19 14:49:49 2018 +0100
Recording .gitmergeinfo Changes
---
.gitmergeinfo | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitmergeinfo b/.gitmergeinfo
index b04a5ab..46000c3 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -680,6 +680,7 @@ B b82303bfb6802817d3ce3be1ce30df74fee50675
B b9191338ff4c00d36251adc352677212b0d6d7d0
B b936edac5170d959fc1b17550d3b83f3a1f5fbdc
B b9df4f5bad7ae1ecee86757c73c0f0fa4bc21de0
+B ba5706de0b5d4e52adb48370159f4be1f1f8278d
B ba5d9375c103178cb31394ee10e9a53ebdb891e8
B ba9fa0e7c7067b5e6536307c0cfdcf5154912647
B bacef091c2152d51ebdefbe20244e73d1c26b39d
@@ -938,6 +939,7 @@ B f94e1dd9b2a8d27ec5a27bfb7c026e3ae2350e39
B f98526a82b0f268d402949964fe8cc065ce9f389
B f98785bd8490c4717353f1a9688cae3e7a823ec2
B f9c02b4a0ff1662b5920c4973f0b8f0239fc6104
+B fa7f87f85b11c917607fa41ffa56c9a172ffff32
B fada97326c967a947f1940237319902c1406eb78
B fb11380da6e5c157ffd311c2925eb533d134c8cb
B fb30f8bffc85fcc3208fcc0e1eda4b54a89b5d37
[cxf] 01/02: CXF-7803 - JCache OAuthDataProvider implementation
doesn't work with refresh tokens
Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 67699e7f4c79fe101155349223a61205cfb74ef3
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Jul 19 10:38:49 2018 +0100
CXF-7803 - JCache OAuthDataProvider implementation doesn't work with refresh tokens
(cherry picked from commit 80e99a279d293958a39eb025af1701176b18c1ef)
(cherry picked from commit df82763af06f5f9e8ef5939782ee3099093bb1a4)
---
.../cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java | 6 ++++++
.../rs/security/oauth2/provider/JCacheOAuthDataProviderTest.java | 6 ++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java
index ebc1689..8933561 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java
@@ -182,6 +182,12 @@ public class JCacheOAuthDataProvider extends AbstractOAuthDataProvider {
}
@Override
+ protected void linkRefreshTokenToAccessToken(RefreshToken rt, ServerAccessToken at) {
+ super.linkRefreshTokenToAccessToken(rt, at);
+ accessTokenCache.replace(at.getTokenKey(), at);
+ }
+
+ @Override
public void close() {
clientCache.close();
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProviderTest.java b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProviderTest.java
index 6d413f3..f2de793 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProviderTest.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProviderTest.java
@@ -33,7 +33,6 @@ import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
public class JCacheOAuthDataProviderTest extends Assert {
@@ -42,6 +41,8 @@ public class JCacheOAuthDataProviderTest extends Assert {
@Before
public void setUp() throws Exception {
provider = new JCacheOAuthDataProvider();
+ provider.setSupportedScopes(Collections.singletonMap("a", "A Scope"));
+ provider.setSupportedScopes(Collections.singletonMap("refreshToken", "RefreshToken"));
}
@Test
@@ -91,7 +92,6 @@ public class JCacheOAuthDataProviderTest extends Assert {
assertEquals(0, allClients.size());
}
- @Ignore
@Test
public void testAddGetDeleteAccessToken() {
Client c = addClient("101", "bob");
@@ -134,7 +134,6 @@ public class JCacheOAuthDataProviderTest extends Assert {
assertNull(provider.getAccessToken(at.getTokenKey()));
}
- @Ignore
@Test
public void testAddGetDeleteAccessToken2() {
Client c = addClient("102", "bob");
@@ -156,7 +155,6 @@ public class JCacheOAuthDataProviderTest extends Assert {
assertEquals(0, tokens.size());
}
- @Ignore
@Test
public void testAddGetDeleteRefreshToken() {
Client c = addClient("101", "bob");