Skip to content

Commit 4b662e0

Browse files
LPD-75170 My bad
1 parent bf427c7 commit 4b662e0

File tree

1 file changed

+4
-5
lines changed
  • modules/dxp/apps/ai-hub/ai-hub-rest-impl/src/main/java/com/liferay/ai/hub/rest/internal/resource/v1_0

1 file changed

+4
-5
lines changed

modules/dxp/apps/ai-hub/ai-hub-rest-impl/src/main/java/com/liferay/ai/hub/rest/internal/resource/v1_0/TokenResourceImpl.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,16 @@ public Token postToken() throws Exception {
3838

3939
Http.Options options = new Http.Options();
4040

41-
options.addPart("client_id", aiHubConfiguration.clientId());
42-
options.addPart("client_secret", aiHubConfiguration.clientSecret());
43-
options.addPart("grant_type", "client_credentials");
44-
4541
AIHubConfiguration aiHubConfiguration =
4642
_configurationProvider.getCompanyConfiguration(
4743
AIHubConfiguration.class, contextCompany.getCompanyId());
4844

45+
options.addPart("client_id", aiHubConfiguration.clientId());
46+
options.addPart("client_secret", aiHubConfiguration.clientSecret());
47+
48+
options.addPart("grant_type", "client_credentials");
4949
options.setLocation(
5050
aiHubConfiguration.serviceURL() + "/o/oauth2/token");
51-
5251
options.setMethod(Http.Method.POST);
5352

5453
JSONObject jsonObject = _jsonFactory.createJSONObject(

0 commit comments

Comments
 (0)