Skip to content

Commit 92dbfe6

Browse files
committed
Credentials renamed
1 parent 55c51ca commit 92dbfe6

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

.github/workflows/pythonapp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
python -m pip install -r tests/requirements.txt
2121
- name: Test with pytest
2222
env:
23-
appSid: ${{secrets.appSid}}
24-
appKey: ${{secrets.appKey}}
23+
clientId: ${{secrets.appSid}}
24+
clientSecret: ${{secrets.appKey}}
2525
apiBaseUrl: "https://api-qa.aspose.cloud"
2626
run: |
2727
python -m pytest --verbose --color=yes -m pipeline tests

.github/workflows/pythonpublish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
pip install -r tests/requirements.txt
2222
- name : Run Tests
2323
env:
24-
appSid: ${{secrets.appSidProd}}
25-
appKey: ${{secrets.appKeyProd}}
24+
clientId: ${{secrets.appSidProd}}
25+
clientSecret: ${{secrets.appKeyProd}}
2626
apiBaseUrl: "https://api.aspose.cloud"
2727
run: |
2828
python -m pytest -m pipeline tests

sdk/AsposeEmailCloudSdk/api/api_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def call_api():
8484
def _request_token(self):
8585
config = self.api_client.configuration
8686
request_url = "/connect/token"
87-
form_params = [('grant_type', 'client_credentials'), ('client_id', config.api_key['app_sid']),
88-
('client_secret', config.api_key['api_key'])]
87+
form_params = [('grant_type', 'client_credentials'), ('client_id', config.api_key['client_id']),
88+
('client_secret', config.api_key['client_secret'])]
8989

9090
header_params = {'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded'}
9191

sdk/AsposeEmailCloudSdk/api/email_cloud.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@ class EmailCloud(object):
3535
Aspose.Email Cloud API.
3636
"""
3737

38-
def __init__(self, app_key=None, app_sid=None, base_url=None,
38+
def __init__(self, client_secret=None, client_id=None, base_url=None,
3939
api_version=None, debug=False):
4040
"""
4141
Initializes a new instance of the EmailCloud class.
4242
43-
:param app_key: The app key.
44-
:type app_key: str
45-
:param app_sid: The app sid.
46-
:type app_sid: str
43+
:param client_secret: The client secret.
44+
:type client_secret: str
45+
:param client_id: The client id.
46+
:type client_id: str
4747
:param base_url: The base URL.
4848
:type base_url: str
4949
:param api_version: API version.
5050
:type api_version: str
5151
:param debug: If debug mode is enabled. False by default.
5252
:type debug: bool
5353
"""
54-
configuration = Configuration(app_key=app_key,
55-
app_sid=app_sid,
54+
configuration = Configuration(client_secret=client_secret,
55+
client_id=client_id,
5656
base_url=base_url,
5757
api_version=api_version,
5858
debug=debug)

sdk/AsposeEmailCloudSdk/configuration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Configuration(object):
4343

4444
default_api_version = 'v4.0'
4545

46-
def __init__(self, app_key=None, app_sid=None, base_url=None,
46+
def __init__(self, client_secret=None, client_id=None, base_url=None,
4747
api_version=None, debug=False):
4848
"""Constructor"""
4949
# Base url
@@ -72,8 +72,8 @@ def __init__(self, app_key=None, app_sid=None, base_url=None,
7272

7373
# Authentication Settings
7474
# dict to store API key(s)
75-
self.api_key = {'api_key': app_key if app_key else "",
76-
'app_sid': app_sid if app_sid else ""}
75+
self.api_key = {'client_secret': client_secret if client_secret else "",
76+
'client_id': client_id if client_id else ""}
7777
# dict to store API prefix (e.g. Bearer)
7878
self.api_key_prefix = {}
7979

@@ -101,7 +101,7 @@ def __init__(self, app_key=None, app_sid=None, base_url=None,
101101
self.__debug = debug
102102

103103
# On-premise switch
104-
self.on_premise = not (app_key or app_sid) and base_url
104+
self.on_premise = not (client_secret or client_id) and base_url
105105

106106
# SSL/TLS verification
107107
# Set this to false to skip verifying SSL certificate when calling API

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def pytest_configure(config):
3131
@pytest.fixture(scope="class")
3232
def td(request):
3333
config = _get_config(request)
34-
app_sid = config["appsid"]
35-
app_key = config["appkey"]
34+
app_sid = config["clientid"]
35+
app_key = config["clientsecret"]
3636
api_base_url = config.get("apibaseurl", "https://api-qa.aspose.cloud")
3737
email_cloud = api.EmailCloud(app_key, app_sid, api_base_url)
3838
auth_url = config.get("authurl")

0 commit comments

Comments
 (0)