Skip to content

sabdelmalik/esp32_http_server_authentication

Repository files navigation

HHTTP Server Authentication

This project uses ESP IDF example: esp-idf\examples\protocols\http_server\simple

Call for authentication is inserted into the hello_get_handler() function. Therefore if this code is invoked from a browser (e.g. http://192.168.2.229/hello), Hello World! will only display after authentication takes place.

The code was tested in VS Code.

Two configuration parameters are available through menuconfig under "HTTP Server Authentication": "HTTP authentication Scheme":

For both HTTP_AUTH_BASIC and HTTP_AUTH_DIGEST, Hello World! is displayed only after the correct credentials are entered. For this code credentials are hard coded as username: joe and password: Password1

"Digest scheme realm": Only requires for Basic and Digest schemes. According to the RFCs, it is a string to be displayed to users so they know which username and password to use.

About

ESP32 HTTP Server Basic and Digest authentication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published