Hallo,
Happy New Year to All!
I want to write a Postman websocket queries to access the OpenEMS Backend, similar to how io.openems.backend.b2bwebsocket works. Similar to Externe Applikation Anbindung
I looked at the Developer tools in the web browser and tried the requests being sent from the UI. If the URL it is sending data to is wss://Backend_Address/BackendAccess
I see responses like:
{"jsonrpc":"2.0","method":"authenticateWithToken","params":{"token":"LONG_TOKEN"},"id":"b61662d7-9dc7-4cb9-8448-4ec06a3951c2"}
If I attach the token in my RPC request and send it to the URL from Postman, then I get a response. But this token is linked to the user and password I use to access the OpenEMS UI. Is there someway to generate the token for the backend access without being linked to a particular user?
Also, how/where is the login Token generated? In the UI code, I see it set in websocket.ts but I do not know how to generate the token. I also see the token used by the User class of Metadata. Is that relevant?
Any advice and guidance is very welcome.
Best