Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BASIC and DIGEST auth support to HTTP protocol adapter. #690

Open
tschak909 opened this issue Dec 18, 2023 · 0 comments
Open

Add BASIC and DIGEST auth support to HTTP protocol adapter. #690

tschak909 opened this issue Dec 18, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tschak909
Copy link
Collaborator

tschak909 commented Dec 18, 2023

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:[email protected]/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.

@tschak909 tschak909 added the enhancement New feature or request label Dec 18, 2023
@idolpx idolpx self-assigned this Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants