Hi all,
I'm creating a DataMiner protocol that communicates over HTTP. Every GET request to the API requires a bearer token for authentication, and this token must be refreshed every 10 minutes via a POST request to a token endpoint.
What is the recommended way to implement this in a protocol? Specifically:
-
How do I handle the bearer token refresh logic properly?
-
How can I ensure that the new token is automatically used when GET parameters are refetched (e.g., by a polling group)?
I’d appreciate guidance or examples on how others have handled this kind of setup.
Thanks in advance!
The login credentials are in raw json format