From 02b9717890b47c2eb8a43d5d02ce5a154ea23af3 Mon Sep 17 00:00:00 2001 From: jaewohong Date: Wed, 17 Dec 2025 10:20:38 +0900 Subject: [PATCH] =?UTF-8?q?NICEON=20Token=20=ED=9A=8D=EB=93=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/HttpClientAccessTokenServiceWithBase64NiceOn.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eactive/eai/authoutbound/client/impl/HttpClientAccessTokenServiceWithBase64NiceOn.java b/src/main/java/com/eactive/eai/authoutbound/client/impl/HttpClientAccessTokenServiceWithBase64NiceOn.java index 51d0382..d960c82 100644 --- a/src/main/java/com/eactive/eai/authoutbound/client/impl/HttpClientAccessTokenServiceWithBase64NiceOn.java +++ b/src/main/java/com/eactive/eai/authoutbound/client/impl/HttpClientAccessTokenServiceWithBase64NiceOn.java @@ -120,6 +120,9 @@ public class HttpClientAccessTokenServiceWithBase64NiceOn implements HttpClientA formParams.add(new BasicNameValuePair("scope", oAuthCredentialVo.getScope())); formParams.add(new BasicNameValuePair("grant_type", oAuthCredentialVo.getGrantType())); + String postParameters = "client_id=" + oAuthCredentialVo.getClientId() + "&client_secret=" + oAuthCredentialVo.getClientSecret() + "&scope=" + oAuthCredentialVo.getScope() + "&grant_type=" + oAuthCredentialVo.getGrantType(); + + // mTLS config with default connection parameters boolean useMtls = StringUtils.equalsIgnoreCase(adapterProp.getProperty(HttpClientAdapterServiceKey.USE_MTLS), "Y"); @@ -195,7 +198,8 @@ public class HttpClientAccessTokenServiceWithBase64NiceOn implements HttpClientA try (CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(connectionManager).build();) { HttpPost httpPost = new HttpPost(uri); - httpPost.setEntity(new UrlEncodedFormEntity(formParams, charset)); + //httpPost.setEntity(new UrlEncodedFormEntity(formParams, charset)); + httpPost.setEntity(new StringEntity(postParameters, StandardCharsets.UTF_8)); httpPost.setHeader("Content-Type", contentType+" charset=" + encode); //HTTP HEADER에 client id, client secret를 base64Encode 한 후 추가