Skip to content

Commit 5e6ae47

Browse files
committed
Client credentials renamed
1 parent 8d7fd11 commit 5e6ae47

File tree

6 files changed

+15
-19
lines changed

6 files changed

+15
-19
lines changed

.github/workflows/pack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
- name: Run tests
1919
run: mvn test -Dgroups=pipeline --batch-mode
2020
env:
21-
appSid: ${{secrets.appSidProd}}
22-
appKey: ${{secrets.appKeyProd}}
21+
clientId: ${{secrets.appSidProd}}
22+
clientSecret: ${{secrets.appKeyProd}}
2323
apiBaseUrl: "https://api.aspose.cloud"
2424
- name: Pack
2525
run: |

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- name: Run tests
1717
run: mvn test -Dgroups=pipeline --batch-mode -q
1818
env:
19-
appSid: ${{secrets.appSid}}
20-
appKey: ${{secrets.appKey}}
19+
clientId: ${{secrets.appSid}}
20+
clientSecret: ${{secrets.appKey}}
2121
apiBaseUrl: "https://api-qa.aspose.cloud"

src/main/java/com/aspose/email/cloud/sdk/api/EmailCloud.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,9 @@
2727

2828
package com.aspose.email.cloud.sdk.api;
2929

30-
import com.aspose.email.cloud.sdk.model.*;
3130
import com.aspose.email.cloud.sdk.invoker.*;
3231
import com.aspose.email.cloud.sdk.invoker.internal.*;
3332
import com.aspose.email.cloud.sdk.invoker.internal.requesthandlers.*;
34-
import java.io.*;
35-
36-
import java.util.HashMap;
3733

3834
/**
3935
* Aspose.Email Cloud API
@@ -133,14 +129,14 @@ public CloudStorageGroup cloudStorage() {
133129

134130
/**
135131
* Initializes a new instance of the EmailCloud class.
136-
* @param appKey The app key.
137-
* @param appSid The app SID.
132+
* @param clientSecret The app key.
133+
* @param clientId The app SID.
138134
*/
139-
public EmailCloud(String appKey, String appSid)
135+
public EmailCloud(String clientSecret, String clientId)
140136
{
141137
Configuration configuration = new Configuration();
142-
configuration.AppKey = appKey;
143-
configuration.AppSid = appSid;
138+
configuration.ClientSecret = clientSecret;
139+
configuration.ClientId = clientId;
144140
this.init(configuration);
145141
}
146142

src/main/java/com/aspose/email/cloud/sdk/invoker/Configuration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ public class Configuration
6565
/**
6666
* Gets or sets the app key.
6767
*/
68-
public String AppKey;
68+
public String ClientSecret;
6969

7070
/**
7171
* Gets or sets the app SID.
7272
*/
73-
public String AppSid;
73+
public String ClientId;
7474

7575
/**
7676
* If API service uses on-premise deployment with metered license

src/main/java/com/aspose/email/cloud/sdk/invoker/internal/requesthandlers/AuthRequestHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ private void requestJwtToken() throws Exception
118118
String requestUrl = this.configuration.getAuthUrl() + "connect/token";
119119

120120
String postData = "grant_type=client_credentials";
121-
postData += "&client_id=" + this.configuration.AppSid;
122-
postData += "&client_secret=" + this.configuration.AppKey;
121+
postData += "&client_id=" + this.configuration.ClientId;
122+
postData += "&client_secret=" + this.configuration.ClientSecret;
123123

124124
this.requestToken(requestUrl, postData);
125125
}

src/test/java/com/aspose/email/cloud/sdk/api/utils/TestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ protected CalendarDto getCalendarDto() {
4040
@BeforeClass(alwaysRun = true)
4141
public void oneTimeSetUp() throws Exception {
4242
Configuration configuration = new Configuration();
43-
configuration.AppKey = System.getenv("appKey");
44-
configuration.AppSid = System.getenv("appSid");
43+
configuration.ClientSecret = System.getenv("clientSecret");
44+
configuration.ClientId = System.getenv("clientId");
4545
configuration.setApiBaseUrl(System.getenv("apiBaseUrl"));
4646
configuration.setApiVersion("v4.0");
4747
configuration.setAuthUrl(System.getenv("authUrl"));

0 commit comments

Comments
 (0)