Simple form of authenticated client in web server?
Posted: Wed Feb 27, 2019 1:17 pm
Hello, I have a question, in a small server with 2 pages, the first being the login one.
How can a client be authenticated and when he disconnects he has to re-enter the password.
And if you put the route in the browser on page 2 do not access it if you have not gone through the access page.
Actually the login works correctly for me, but if I put the full path of page 2, it also serves me without any password.
For example:
I have searched but I do not see anything clear or simple to implement.
Greetings and thank you
How can a client be authenticated and when he disconnects he has to re-enter the password.
And if you put the route in the browser on page 2 do not access it if you have not gone through the access page.
Actually the login works correctly for me, but if I put the full path of page 2, it also serves me without any password.
For example:
Code: Select all
webServer.on ("/ loginconfig.php", [] ()
{
if (webServer.args ()> 0 && webServer.arg (0) == "password")
{
webServer.send (200, "text / html", PASSOK);
}
else
{
webServer.send (200, "text / html", ERRORPASS);
}
I have searched but I do not see anything clear or simple to implement.
Greetings and thank you