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: Thu, 23 Apr 2020 16:26:25 +0200

Il giorno gio 23 apr 2020 alle ore 14:12 Trampas Stern <address@hidden> ha scritto:
So what I did is added support for cookies.  Basically in the http_parse_request() I created a callback that I call which passes header to the call back.  In the function I get the cookie for a session ID, and return a redirect if the current user is not logged in. 

When the user connects the callback checks the session ID cookie and the remote IP port for match, if they do not match current logged in person I redirect them to login page.  The login page assigns them a new random session id and lets them enter password.  If password matches then I store their session id and IP address as being logged in.  

What needs to be done on the html side? I mean, in some way the browser has to know that it has to send the cookie in the header, am I correct? But how?


reply via email to

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