Skip to content

Commit eda3e73

Browse files
authored
Update gridappsd_field_bus.py
Allow global variable to be set for not using a token auth but just username password.
1 parent dc7d4e8 commit eda3e73

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gridappsd-field-bus-lib/gridappsd_field_bus/field_interface/gridappsd_field_bus.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def __init__(self, definition: MessageBusDefinition):
1313
self._user = definition.connection_args["GRIDAPPSD_USER"]
1414
self._password = definition.connection_args["GRIDAPPSD_PASSWORD"]
1515
self._address = definition.connection_args["GRIDAPPSD_ADDRESS"]
16+
self._use_auth_token = definition.connection_args.get("GRIDAPPSD_USE_TOKEN_AUTH")
1617

1718
self.gridappsd_obj = None
1819

@@ -29,7 +30,7 @@ def connect(self):
2930
"""
3031
Connect to the concrete message bus that implements this interface.
3132
"""
32-
self.gridappsd_obj = GridAPPSD()
33+
self.gridappsd_obj = GridAPPSD(use_auth_token=self._use_auth_token)
3334

3435
def subscribe(self, topic, callback):
3536
if self.gridappsd_obj is not None:

0 commit comments

Comments
 (0)