ruuvi / ruuvi.gateway_esp.c

Ruuvi Gateway ESP32 code
BSD 3-Clause "New" or "Revised" License
24 stars 15 forks source link

Add HTTP authentication method "API key" that does not prefix the key with the word "Token" #1044

Closed jheba closed 1 month ago

jheba commented 1 month ago

Hi,

Problem as in the title - the "API key (token)" is prefixed unexpectedly by word "Token" which makes impossible to authenticate against IoT Hub/IoT Central with SAS (shared access signature) key which is set in Authorization header.

Is the "Token" required by any specific protocol? If so, one could simply type the word "Token" if needed in front of the actual token.

Please note that this is BC breaking change, so it needs to be properly announced. Alternatively a new, fully customizable authentication method could be implemented.

jheba commented 1 month ago

Hi. Thanks for speedy implementation! I can confirm that the authentication against IoT Hub works fine with the new API Key authentication method (I can see the validation data in the IoT Hub), however the validation of the endpoint fails (ref. https://github.com/ruuvi/ruuvi.gateway_esp.c/issues/1047), so the config cannot be saved.

markoaamunkajo commented 1 month ago

QA passed