Skip to content

Commit 165666f

Browse files
committed
Add functionality for authentication
1 parent c4d1df1 commit 165666f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

aas_python_http_client/api/asset_administration_shell_repository_api_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def delete_asset_administration_shell_by_id_with_http_info(self, aas_identifier,
108108

109109
# Authentication setting
110110
auth_settings = [] # noqa: E501
111+
if self.api_client.configuration.username != '' and self.api_client.configuration.password != '':
112+
auth_settings = ['basic_auth']
111113

112114
return self.api_client.call_api(
113115
'/shells/{aasIdentifier}', 'DELETE',
@@ -4740,6 +4742,8 @@ def post_asset_administration_shell_with_http_info(self, body, **kwargs): # noq
47404742

47414743
# Authentication setting
47424744
auth_settings = [] # noqa: E501
4745+
if self.api_client.configuration.username != '' and self.api_client.configuration.password != '':
4746+
auth_settings = ['basic_auth']
47434747

47444748
return self.api_client.call_api(
47454749
'/shells', 'POST',

aas_python_http_client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def auth_settings(self):
231231
232232
:return: The Auth Settings information dict.
233233
"""
234-
return {
234+
return {'basic_auth': {'in': 'header', 'key': 'Authorization', 'value': self.get_basic_auth_token()}
235235
}
236236

237237
def to_debug_report(self):

0 commit comments

Comments
 (0)