Skip to content

Commit eefd4af

Browse files
committed
Working complete multiteant tutorials
* manually checked
1 parent d47519b commit eefd4af

File tree

6 files changed

+485
-253
lines changed

6 files changed

+485
-253
lines changed

libs/aries-basic-controller/aries_basic_controller/aries_controller.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,15 @@ def __init__(
5656
self.webhook_port = webhook_port
5757
self.connections_controller = None
5858

59-
self.headers = {}
59+
headers = {}
6060

6161
if api_key:
62-
self.api_key = api_key
63-
self.headers.update({"X-API-Key": api_key})
62+
headers = headers.update({"X-API-Key": api_key})
6463

6564
if tennant_jwt:
66-
self.tennant_jwt = tennant_jwt
67-
self.headers.update({'Authorization': 'Bearer ' + tennant_jwt, 'content-type': "application/json"})
65+
headers = headers.update({'Authorization': 'Bearer ' + tennant_jwt, 'content-type': "application/json"})
6866

69-
self.client_session: ClientSession = ClientSession(headers= self.headers)
67+
self.client_session: ClientSession = ClientSession(headers=headers)
7068

7169

7270
if connections:
@@ -112,8 +110,8 @@ def __init__(
112110
# to update every attr using ClientSession
113111
def update_tennant_jwt(self, tennant_jwt):
114112
self.tennant_jwt = tennant_jwt
115-
self.headers.update({'Authorization': 'Bearer ' + tennant_jwt, 'content-type': "application/json"})
116-
self.client_session: ClientSession = ClientSession(headers=self.headers)
113+
headers = {'Authorization': 'Bearer ' + tennant_jwt, 'content-type': "application/json"}
114+
self.client_session: ClientSession = ClientSession(headers=headers)
117115

118116
if self.connections:
119117
self.connections = ConnectionsController(self.admin_url, self.client_session)

0 commit comments

Comments
 (0)