How does the authentication window get initiated in this example?
The server.begin(80) and similar statements looks the same as the non protected examples.
Authentication statement if(header.indexOf(“dXNlcjpwYXNz”) >= 0)
also looks similar to user buttons if (header.indexOf(“GET /26/on”) >= 0)
Hello Bill, in summary for that project we’re using “Basic Access Authentication” (which uses base64 encoding). The form that requests the username/password is automatically generated by your web browser.
That statement verifies if you’ve entered the user/password in the form by searching for the encoded string in your request (dXNlcjpwYXNz):
if(header.indexOf(“dXNlcjpwYXNz”) >= 0)
The button presses are very similar, because if you access that URL that part comes in your request “GET /26/on”
if (header.indexOf(“GET /26/on”) >= 0)