FujiNetWIFI/fujinet-firmware

Add BASIC and DIGEST auth support to HTTP protocol adapter.

tschak909 opened this issue · 0 comments

Given the following BASIC code

XIO #8,253,0,0,U$
XIO #8,254,0,0,P$
NOPEN 8,4,0,URL$
... it feeds me "no username or password provided." 

U$="N:my_username"
P$="N:mypassword"
URL$=working url clearly because I am getting the response

or via the URL

N:http://username:password@host.domain/path/?...

Be able to fill out the auth_type field in esp_http_client() so that the appropriate BASIC or DIGEST request can be made for HTTP endpoints that require authentication in those two methods.

Relevant changes would need to be made in the fnHTTPClient:
https://github.com/FujiNetWIFI/fujinet-platformio/blob/master/lib/http/fnHttpClient.cpp#L45

and in the HTTP protocol adapter:
https://github.com/FujiNetWIFI/fujinet-platformio/blob/master/lib/network-protocol/HTTP.cpp

The relevant information for the esp_http_client is here:
https://docs.espressif.com/projects/esp-idf/en/v4.3-beta2/esp32s2/api-reference/protocols/esp_http_client.html#http-authentication

with one additional command added to set the AUTH type.