lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Basic Authentication


From: Marco Lazzaroni
Subject: Re: [lwip-users] Basic Authentication
Date: Fri, 24 Apr 2020 09:49:01 +0200



Il giorno gio 23 apr 2020 alle ore 17:13 Trampas Stern <address@hidden> ha scritto:
document.cookie = "sessionToken=3"                        ;

This will set the sessionToken (session ID) to 3.  So in the firmware when the httpd.c requests this file I find this string and replace the buffer with the correct session ID number I want.  This then sets the cookie and browser will send this cookie with every request to device. 

https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies 

Then in my call back I parse the HTML header for the session cookie, to see if it matches who is logged in. 

In the login what I do is have user type admin password, which I then send a MD5 hash with session ID.  If the MD5 hash matches I record IP and session ID for person logged in. 

Trampas 

Thank you for your explanation! 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]