add ID_FEDERATED

This commit is contained in:
Cayo Puigdefabregas 2023-06-05 17:11:28 +02:00
parent b29086e46d
commit 79c2ecbd81
2 changed files with 4 additions and 0 deletions

View File

@ -97,6 +97,7 @@ class DevicehubConfig(Config):
MAIL_DEFAULT_SENDER = config('MAIL_DEFAULT_SENDER', '')
API_DLT = config('API_DLT', None)
API_DLT_TOKEN = config('API_DLT_TOKEN', None)
ID_FEDERATED = config('ID_FEDERATED', None)
"""Definition of oauth jwt details."""
OAUTH2_JWT_ENABLED = config('OAUTH2_JWT_ENABLED', False)

View File

@ -972,6 +972,9 @@ class Device(Thing):
if isinstance(c, DataStorage):
c.register_dlt()
if app.config('ID_FEDERATED'):
api.add_service(self.chid, 'devicehub', app.config('ID_FEDERATED'), '', '')
def unreliable(self):
self.user_trusts = False
i = 0