Product/components used and version/fix level:
Cumulocity IoT -Cockpit-Custom Widget || Version:Latest ||Date:5/6/2023
Detailed explanation of the problem:
I want to make an authentication check for my custom widget. In my cockpit, there are a lot of custom widget.
For some widget, I only want users who have a right user_name and password in my database can see the content.
Below is my thought
- User type their username + password and submit.(done)
- username and password will be transfered to opcua node.(done)
3.There is another threading in opcua server that will check the username and password via an online database like MongoDb Atlas (done) - If the user and password are right, shows full widget.(Problem)
Server is writen in a Python program. Problem is: When the authentication check in python results a ‘True’, how can I send this back to the widget?
Here are my thought(don’t know whether it is possible)
- save the ‘True’ in a node. Click ,for example ‘check’ in the widget, and compare the value with a predifined ‘True’ in a .ts service. (I don’t know how to get the value from nodes via angular, like ‘c8y_ua_command_WriteValue’ can write value to a node)
Could you give me some advice of that?
Error messages / full error message screenshot / log file:
Question related to a free trial, or to a production (customer) instance?
Production instance. Custom widget.