Somfy-Developer / Somfy-TaHoma-Developer-Mode

A collection of requests to use a local API with Somfy TaHoma gateways
147 stars 12 forks source link

Possible to activate the same token multiple times #55

Closed yarwoob closed 2 years ago

yarwoob commented 2 years ago

Once you have generated a token: https://{{url}}/enduser-mobile-web/enduserAPI/config/{{pod}}/local/tokens/generate

It's possible to activate this token multiple times using the same label: https://{{url}}/enduser-mobile-web/enduserAPI/config/{{pod}}/local/tokens

Leading to the get available tokens call: https://{{url}}/enduser-mobile-web/enduserAPI/config/{{pod}}/local/tokens/devmode

Returning the same token more than once and generating a new uuid and expiration time. [ { "label": "Test token", "gatewayId": "2017-4189-xxxx", "expirationTime": 1677478559000, "gatewayCreationTime": 1661710559000, "uuid": "2dff573b-xxxxxxxxxxxxxxxxxx", "scope": "devmode" }, { "label": "Test token", "gatewayId": "2017-4189-xxxx", "expirationTime": 1677725131000, "gatewayCreationTime": 1661957131000, "uuid": "c9a56e72-xxxxxxxxxxxxxxxxxxx", "scope": "devmode" } ]

AdyRock commented 2 years ago

As far as I can see, the label is just for you reference. What is it you are trying to achieve?

yarwoob commented 2 years ago

It's more a question for the devs about functionality and intent. My original is badly worded. I have everything I need working just fine.

  1. Should the same token be able to be activated multiple times? What are the implications of this for functionality when the same token then has different uuid's and expirations.

  2. Less importantly as I agree the label is just a reference. Should you be able to have duplicate labels or should they be unique?

llavorel-somfy commented 2 years ago

Hi @yarwoob This is the normal behavior. Do not see it as an issue.