This is an automated email from the ASF dual-hosted git repository. coheigea pushed a commit to branch 3.3.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit e957b383f10d808482d6b890c80e62634ee4153b Author: Colm O hEigeartaigh <[email protected]> AuthorDate: Thu Jul 9 10:09:23 2020 +0100 Recording .gitmergeinfo Changes --- .gitmergeinfo | 1 + .../jaxrs/security/oauth2/grants/AuthorizationGrantTest.java | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitmergeinfo b/.gitmergeinfo index 906091f..1f46fe9 100644 --- a/.gitmergeinfo +++ b/.gitmergeinfo @@ -340,6 +340,7 @@ M 9a5b4568a94a72569caf4d012a42df6ebbe02779 M 9c2721f27e9697fa0f515e0787f75c26077d0572 M 9c37b6c321f06621334076cc61b5b31b237f634d M 9c462e9bd614d529f0a2fd86490243ea1c858651 +M a0f76d634d9b58a2644bc01532d7dd87b66081de M a3682d5fefddc8daaa068e0afe98ec6070da7dd4 M a4fc3a0462f09dd6c6c920385b67e621d7e36399 M a61ca44ab50c1a3fc20fbaafe89b372809e0f49b diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/AuthorizationGrantTest.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/AuthorizationGrantTest.java index f6b11e3..29a082b 100644 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/AuthorizationGrantTest.java +++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/AuthorizationGrantTest.java @@ -282,9 +282,11 @@ public class AuthorizationGrantTest extends AbstractBusClientServerTestBase { // Here we don't specify a scope in the refresh token call @org.junit.Test public void testAuthorizationCodeGrantRefreshWithoutScope() throws Exception { + URL busFile = AuthorizationGrantTest.class.getResource("client.xml"); + String address = "https://localhost:" + port + "/services/"; WebClient client = WebClient.create(address, OAuth2TestUtils.setupProviders(), - "alice", "security", null); + "alice", "security", busFile.toString()); // Save the Cookie for the second request... WebClient.getConfig(client).getRequestContext().put( org.apache.cxf.message.Message.MAINTAIN_SESSION, Boolean.TRUE); @@ -295,7 +297,7 @@ public class AuthorizationGrantTest extends AbstractBusClientServerTestBase { // Now get the access token client = WebClient.create(address, OAuth2TestUtils.setupProviders(), - "consumer-id", "this-is-a-secret", null); + "consumer-id", "this-is-a-secret", busFile.toString()); // Save the Cookie for the second request... WebClient.getConfig(client).getRequestContext().put( org.apache.cxf.message.Message.MAINTAIN_SESSION, Boolean.TRUE); @@ -312,8 +314,9 @@ public class AuthorizationGrantTest extends AbstractBusClientServerTestBase { form.param("grant_type", "refresh_token"); form.param("refresh_token", accessToken.getRefreshToken()); form.param("client_id", "consumer-id"); + Response response = client.post(form); - accessToken = client.post(form, ClientAccessToken.class); + accessToken = response.readEntity(ClientAccessToken.class); assertNotNull(accessToken.getTokenKey()); assertNotNull(accessToken.getRefreshToken()); // assertEquals("read_balance", accessToken.getApprovedScope());
