<div dir="ltr">It doesn't seem to make much difference.<div><br></div><div>Js console shows:</div><div><br></div><div><div>GET <a href="http://localhost:7681/lwsgs/lwsgs.js">http://localhost:7681/lwsgs/lwsgs.js</a> net::ERR_INCOMPLETE_CHUNKED_ENCODING</div><div>(index):32 Uncaught ReferenceError: lwsgs_user is not defined(anonymous function) @ (index):32</div><div>(index):99 Uncaught ReferenceError: san is not defined(anonymous function) @ (index):99</div><div>(index):113 Uncaught ReferenceError: lwsgs_user is not defined(anonymous function) @ (index):113</div></div><div><br></div><div>Log shows:</div><div><br></div><div><div>lwsws[13480]: Set privs to user 'apache'</div><div>lwsws[13480]: failed to get sid from wsi</div><div>lwsws[13480]: LWS_CALLBACK_ADD_HEADERS: setting cookie 'id=df5a721afc83cb6d849282b3fe6fd43d75073213;Expires=2016-05-24 18:27 GMT;path=/;Max-Age=1464114478;HttpOnly'</div><div>lwsws[13480]: failed to get sid from wsi</div><div>lwsws[13480]: want /usr/local/share/libwebsockets-test-server/generic-sessions//lwsgs.js interpreted by protocol-generic-sessions</div><div>lwsws[13480]: LWS_CALLBACK_ADD_HEADERS: setting cookie 'id=9204b4cdb481b9f84ebfa4f686e441bb1065c5bb;Expires=2016-05-24 18:27 GMT;path=/;Max-Age=1464114479;HttpOnly'</div><div>lwsws[13480]: Used up interpret padding</div><div>lwsws[13480]: LWS_CALLBACK_HTTP</div><div>lwsws[13480]: failed to get sid from wsi</div><div>lwsws[13480]: LWS_CALLBACK_ADD_HEADERS: setting cookie 'id=340c5b33faf9ca957048845f13e7cfe37a56991e;Expires=2016-05-24 18:27 GMT;path=/;Max-Age=1464114479;HttpOnly'</div><div>lwsws[13480]: wsi 0x1c8b8b0: TIMEDOUT WAITING on 10 (did hdr 1, ah 0x1c40048, wl 0, pfd events 0)</div><div>lwsws[13480]: lws_header_table_detach: wsi 0x1c8b8b0: ah held 21s, ah.rxpos 568, ah.rxlen 568, mode/state 2 4,wsi->more_rx_waiting 0</div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 24 May 2016 at 18:39 Andy Green <<a href="mailto:andy@warmcat.com">andy@warmcat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 05/25/2016 01:32 AM, Andy Green wrote:<br>
><br>
><br>
> On May 25, 2016 1:23:50 AM GMT+08:00, Colin Adams <<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>> wrote:<br>
>> I'm still seeing a blank page (from display:none on the divs).<br>
><br>
> Check your browser js console... when you first saw this it was because the browser looked for /lwsgs.js when it should have looked at /lwsgs/lwsgs.js, and got a 404.  After that it won't be able to process the scripts.<br>
><br>
> That should be solved by the / at the end of the url.<br>
><br>
> For reference if I clear the cookie by hand at the browser and then go to <a href="http://localhost:7681/lwsgs" rel="noreferrer" target="_blank">http://localhost:7681/lwsgs</a> the log is<br>
><br>
> lwsws[12811]: failed to get sid from wsi<br>
> lwsws[12811]: failed to get sid from wsi<br>
> lwsws[12811]: LWS_CALLBACK_ADD_HEADERS: setting cookie 'id=8c0325ae054f18f5eaf8428de75c77d5c9038aee;Expires=2016-05-24 17:45 GMT;path=/;Max-Age=1464111957;HttpOnly'<br>
> lwsws[12811]: want /usr/share/libwebsockets-test-server/generic-sessions//lwsgs.js interpreted by protocol-generic-sessions<br>
><br>
> and I have the login page up (which can login using the default admin credentials).<br>
<br>
Sorry one more update on master that might be related.<br>
<br>
-Andy<br>
<br>
> -Andy<br>
><br>
>> The log looks innocuous:<br>
>><br>
>> wsws[12023]: Set privs to user 'apache'<br>
>> lwsws[12023]: failed to get sid from wsi<br>
>> lwsws[12023]: LWS_CALLBACK_ADD_HEADERS: setting cookie<br>
>> 'id=da8e98cc0e4b771f77e042121183a3b8f2b0b86d;Expires=2016-05-24 17:41<br>
>> GMT;path=/;Max-Age=1464111699;HttpOnly'<br>
>> lwsws[12023]: failed to get sid from wsi<br>
>> lwsws[12023]: failed to get sid from wsi<br>
>> lwsws[12023]: LWS_CALLBACK_ADD_HEADERS: setting cookie<br>
>> 'id=c7762dcda3c39bd0f1c3628b77cf50d61b22bca9;Expires=2016-05-24 17:41<br>
>> GMT;path=/;Max-Age=1464111704;HttpOnly'<br>
>> lwsws[12023]: failed to get sid from wsi<br>
>> lwsws[12023]: LWS_CALLBACK_ADD_HEADERS: setting cookie<br>
>> 'id=2d3a680609d72519c539c7f1822fdf40a7ffd1e3;Expires=2016-05-24 17:43<br>
>> GMT;path=/;Max-Age=1464111783;HttpOnly'<br>
>><br>
>><br>
>> On Tue, 24 May 2016 at 18:12 Andy Green <<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>> wrote:<br>
>><br>
>>><br>
>>><br>
>>> On 05/25/2016 01:04 AM, Colin Adams wrote:<br>
>>>> It's the same result, although it takes longer, and the log entries<br>
>> are<br>
>>>> different:<br>
>>>><br>
>>>> wsws[11461]: Set privs to user 'apache'<br>
>>>> lwsws[11461]: failed to get sid from wsi<br>
>>>> lwsws[11461]: LWS_CALLBACK_ADD_HEADERS: setting cookie<br>
>>>> 'id=3f1d8b0159ffe2c1f1abaf74a2cbbee84f229391;Expires=2016-05-24<br>
>> 17:23<br>
>>>> GMT;path=/;Max-Age=1464110613;HttpOnly'<br>
>>>> lwsws[11461]: failed to get sid from wsi<br>
>>>> lwsws[11461]: want<br>
>>>><br>
>> /usr/local/share/libwebsockets-test-server/generic-sessions//lwsgs.js<br>
>>>> interpreted by protocol-generic-sessions<br>
>>>> lwsws[11461]: LWS_CALLBACK_ADD_HEADERS: setting cookie<br>
>>>> 'id=abc1299229ef19850166323b1dcd055ecf155d7a;Expires=2016-05-24<br>
>> 17:23<br>
>>>> GMT;path=/;Max-Age=1464110613;HttpOnly'<br>
>>>> lwsws[11461]: Used up interpret padding<br>
>>>> lwsws[11461]: LWS_CALLBACK_HTTP<br>
>>>> lwsws[11461]: failed to get sid from wsi<br>
>>>> lwsws[11461]: LWS_CALLBACK_ADD_HEADERS: setting cookie<br>
>>>> 'id=157a2df7dac198c16b3477a5ce494a713d486b7a;Expires=2016-05-24<br>
>> 17:23<br>
>>>> GMT;path=/;Max-Age=1464110613;HttpOnly'<br>
>>>> lwsws[11461]: wsi 0x229b8b0: TIMEDOUT WAITING on 10 (did hdr 1, ah<br>
>>>> 0x224f3a0, wl 0, pfd events 0)<br>
>>>> lwsws[11461]: lws_header_table_detach: wsi 0x229b8b0: ah held 21s,<br>
>>>> ah.rxpos 568, ah.rxlen 568, mode/state 2 4,wsi->more_rx_waiting 0<br>
>>>> lwsws[11461]: failed to get sid from wsi<br>
>>><br>
>>> If you update to master again, the need for / and that problem should<br>
>>> both be gone.<br>
>>><br>
>>> -Andy<br>
>>><br>
>>>><br>
>>>><br>
>>>> On Tue, 24 May 2016 at 17:57 Andy Green <<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>> wrote:<br>
>>>><br>
>>>><br>
>>>><br>
>>>>      On 05/25/2016 12:32 AM, Colin Adams wrote:<br>
>>>>       > Oh, sid stands for session-id - I see.<br>
>>>>       ><br>
>>>>       > I thought I'd changed the /usr/share to /usr/local/share -<br>
>> but as<br>
>>> you<br>
>>>>       > worked out, I hadn't.<br>
>>>>       ><br>
>>>>       > Now I've fixed that, I see an empty page. Looking at the<br>
>> source,<br>
>>>>      I see<br>
>>>>       > style="display:none" on both the div elements.<br>
>>>><br>
>>>>      If you go to<br>
>>>><br>
>>>>      <a href="http://localhost:7681/lwsgs/" rel="noreferrer" target="_blank">http://localhost:7681/lwsgs/</a><br>
>>>><br>
>>>>      (note the final / ) I think you'll be working.<br>
>>>><br>
>>>>      -Andy<br>
>>>><br>
>>>>       > On Tue, 24 May 2016 at 17:11 Andy Green <<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       > <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>> wrote:<br>
>>>>       ><br>
>>>>       ><br>
>>>>       ><br>
>>>>       >     On 05/24/2016 11:52 PM, Colin Adams wrote:<br>
>>>>       >      > OK. Getting nearer now.<br>
>>>>       >      ><br>
>>>>       >      > If I understand the readme correctly, to get a login<br>
>> page<br>
>>>>      i need to<br>
>>>>       >      > point my browser to<br>
>>>>       >      ><br>
>>>>       >      > <a href="http://localhost:7681/lwsgs" rel="noreferrer" target="_blank">http://localhost:7681/lwsgs</a><br>
>>>>       >      ><br>
>>>>       >      > If I do that, I get a 404, and the log says:<br>
>>>>       ><br>
>>>>       >     The canned paths in the readme assume things installed<br>
>> in<br>
>>>>      /usr/share,<br>
>>>>       >     you'll need to slip a '/local' in them if that's where<br>
>> they<br>
>>> were<br>
>>>>       >     installed.<br>
>>>>       ><br>
>>>>       >      > lwsws[10660]: failed to get sid from wsi<br>
>>>>       ><br>
>>>>       >     That's ok since no chance to paint the client with a<br>
>> cookie<br>
>>> the<br>
>>>>       >     first time.<br>
>>>>       ><br>
>>>>       >     -Andy<br>
>>>>       ><br>
>>>>       >      ><br>
>>>>       >      > On Tue, 24 May 2016 at 16:26 Colin Adams<br>
>>>>       >     <<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>> <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>> <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>><br>
>>>>       >      > <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>>>> wrote:<br>
>>>>       >      ><br>
>>>>       >      >     Confirmed that it acquired the apache id:<br>
>>>>       >      ><br>
>>>>       >      >     ps -U root -u apache u | grep lwsws<br>
>>>>       >      >     apache   10599  0.0  0.0  70032  6108 ?        Ss<br>
>>>>        16:25   0:00<br>
>>>>       >      >     /usr/local/bin/lwsws -D<br>
>>>>       >      ><br>
>>>>       >      ><br>
>>>>       >      >     On Tue, 24 May 2016 at 16:16 Colin Adams<br>
>>>>       >     <<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>> <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>> <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>><br>
>>>>       >      >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>>>> wrote:<br>
>>>>       >      ><br>
>>>>       >      >         I'm just calling<br>
>>>>       >      >         sudo /usr/local/bin/lwsws<br>
>>>>       >      >         so it ought to be running as root<br>
>>>>       >      ><br>
>>>>       >      >         On Tue, 24 May 2016 at 16:13 Andy Green<br>
>>>>      <<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >      >         <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>>> wrote:<br>
>>>>       >      ><br>
>>>>       >      ><br>
>>>>       >      ><br>
>>>>       >      >             On May 24, 2016 11:10:32 PM GMT+08:00,<br>
>> Colin<br>
>>> Adams<br>
>>>>       >      >             <<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>><br>
>> <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>>>><br>
>>>>       >      >             wrote:<br>
>>>>       >      >              >OK. I've got it installed.<br>
>>>>       >      >              ><br>
>>>>       >      >              >But when running I get messages:<br>
>>>>       >      >              ><br>
>>>>       >      >              >lwsws[10192]: Unable to open session db<br>
>>>>       >      >             /var/www/sessions/lws.sqlite3:<br>
>>>>       >      >              >unable to open database file<br>
>>>>       >      >              ><br>
>>>>       >      >              >I don't know anything about sqlite3,<br>
>> but I'm<br>
>>>>      guessing<br>
>>>>       >      >             perhaps I need to<br>
>>>>       >      >              >define a user name first? Or is there<br>
>>>>      something missing<br>
>>>>       >      >             from the readme<br>
>>>>       >      >              >(I<br>
>>>>       >      >              >issued the two commands to create the<br>
>>>>      directory and set<br>
>>>>       >      >             the owner to<br>
>>>>       >      >              >root.apache).<br>
>>>>       >      ><br>
>>>>       >      >             Are you starting it as root?  Otherwise<br>
>> it<br>
>>> doesn't<br>
>>>>       >     have the<br>
>>>>       >      >             rights to change to run under apache uid.<br>
>>>>       >      ><br>
>>>>       >      >             -Andy<br>
>>>>       >      ><br>
>>>>       >      >              >On Tue, 24 May 2016 at 15:38 Andy Green<br>
>>>>       >     <<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>>><br>
>>>>       >     wrote:<br>
>>>>       >      >              ><br>
>>>>       >      >              >><br>
>>>>       >      >              >><br>
>>>>       >      >              >> On 05/24/2016 09:06 PM, Colin Adams<br>
>> wrote:<br>
>>>>       >      >              >> > I did:<br>
>>>>       >      >              >> > git pull<br>
>>>>       >      >              >> > cd build<br>
>>>>       >      >              >> > make<br>
>>>>       >      >              >> > sudo make install<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> > and got:<br>
>>>>       >      >              >> > CMake Error at<br>
>> cmake_install.cmake:427<br>
>>>>      (file):<br>
>>>>       >      >              >> > file INSTALL cannot find<br>
>>>>       >      ><br>
>>> "/home/colin/libwebsockets/plugins/lwsgs.js".<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> > I had previously done:<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> > cmake -D LWS_WITHOUT_DAEMONIZE=OFF<br>
>> -D<br>
>>>>       >     LWS_WITH_PLUGINS=ON<br>
>>>>       >      >              >> > -DLWS_WITH_LWSWS=1 ..<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> > so is there anything else I should<br>
>> have<br>
>>>>      done?<br>
>>>>       >      >              >><br>
>>>>       >      >              >> No it's my fault, I missed it from<br>
>> git<br>
>>>>      add.  Please<br>
>>>>       >      >             fetch (not pull)<br>
>>>>       >      >              >> master again.<br>
>>>>       >      >              >><br>
>>>>       >      >              >> Because master doesn't have a<br>
>> history, you<br>
>>>>      need<br>
>>>>       >     to track<br>
>>>>       >      >             it like<br>
>>>>       >      >              >this,<br>
>>>>       >      >              >> assuming you have no local patches<br>
>>>>       >      >              >><br>
>>>>       >      >              >> $ git fetch<br>
>>>>       > <a href="https://github.com/warmcat/libwebsockets.git" rel="noreferrer" target="_blank">https://github.com/warmcat/libwebsockets.git</a><br>
>>>>       >      >             +master:m &&<br>
>>>>       >      >              >> git reset --hard m<br>
>>>>       >      >              >><br>
>>>>       >      >              >> -Andy<br>
>>>>       >      >              >><br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> > On Tue, 24 May 2016 at 11:26 Andy<br>
>> Green<br>
>>>>       >      >             <<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>><br>
>>>>       >      >              >> > <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>>>><br>
>>>>       >      >             wrote:<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> >     On 05/24/2016 06:15 PM, Colin<br>
>> Adams<br>
>>>>      wrote:<br>
>>>>       >      >              >> >      > My opinion is that I<br>
>> personally<br>
>>>>      will not<br>
>>>>       >     need<br>
>>>>       >      >             anything<br>
>>>>       >      >              >beyond<br>
>>>>       >      >              >> >     what you<br>
>>>>       >      >              >> >      > have already described (but<br>
>> I am<br>
>>>>       >     assuming that<br>
>>>>       >      >             the email<br>
>>>>       >      >              >address<br>
>>>>       >      >              >> that<br>
>>>>       >      >              >> >      > the user used for<br>
>> registration is<br>
>>>>       >     available in<br>
>>>>       >      >             the DB. And<br>
>>>>       >      >              >maybe<br>
>>>>       >      >              >> that<br>
>>>>       >      >              >> >      > assumption is wrong).<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> >     It will be... you can see the<br>
>> schema<br>
>>>>      here<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> ><br>
>>>>       >      >              >><br>
>>>>       >      ><br>
>>>>       ><br>
>>>>       ><br>
>>><br>
>> <a href="https://github.com/warmcat/libwebsockets/blob/master/plugins/protocol_generic_sessions.c#L522" rel="noreferrer" target="_blank">https://github.com/warmcat/libwebsockets/blob/master/plugins/protocol_generic_sessions.c#L522</a><br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> >     but the register / email part<br>
>> is not<br>
>>>>      wired<br>
>>>>       >     up yet.<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> >     Currently I am imagining this<br>
>>>>       >     "generic-sessions"<br>
>>>>       >      >             plugin only<br>
>>>>       >      >              >deals<br>
>>>>       >      >              >> with<br>
>>>>       >      >              >> >     authentication of a username.<br>
>> That<br>
>>>>      includes<br>
>>>>       >      >             registration,<br>
>>>>       >      >              >email<br>
>>>>       >      >              >> >     confirmation, "forgot<br>
>> password",<br>
>>>>      eventually<br>
>>>>       >     admin<br>
>>>>       >      >             maintenance<br>
>>>>       >      >              >pages,<br>
>>>>       >      >              >> >     managing the sesion database<br>
>> and so<br>
>>>>      on, but<br>
>>>>       >     NO other<br>
>>>>       >      >              >information<br>
>>>>       >      >              >> except<br>
>>>>       >      >              >> >     the client has a cookie<br>
>>>>      authenticated for a<br>
>>>>       >     given<br>
>>>>       >      >             username (or<br>
>>>>       >      >              >no<br>
>>>>       >      >              >> >     username if not logged in).<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> >     So the api to this in your ws<br>
>>>>      protocol handler<br>
>>>>       >      >             would only be<br>
>>>>       >      >              >"what's<br>
>>>>       >      >              >> my<br>
>>>>       >      >              >> >     username".  If it gives you a<br>
>>>>      username, you<br>
>>>>       >     know<br>
>>>>       >      >             it has been<br>
>>>>       >      >              >> >     authenticated.  You can also<br>
>>> segregate<br>
>>>>       >     access to<br>
>>>>       >      >             mounts by if<br>
>>>>       >      >              >you're<br>
>>>>       >      >              >> >     logged in, or logged in as<br>
>> admin, but<br>
>>>>       >     that's it.<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> >     Storing stuff that your<br>
>> protocol<br>
>>> handler<br>
>>>>       >     deals in<br>
>>>>       >      >             for that<br>
>>>>       >      >              >user, eg,<br>
>>>>       >      >              >> >     using the username as the db<br>
>> key, is<br>
>>>>       >     completely a<br>
>>>>       >      >             separate<br>
>>>>       >      >              >issue<br>
>>>>       >      >              >> private<br>
>>>>       >      >              >> >     to your protocol handler.  It<br>
>> would,<br>
>>> eg,<br>
>>>>       >     use its<br>
>>>>       >      >             own sqlite3<br>
>>>>       >      >              >database<br>
>>>>       >      >              >> >     for it if that's what he wanted<br>
>> to<br>
>>> do.<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> >     -Andy<br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> ><br>
>>>>       >      >              >> >      > On Tue, 24 May 2016 at 11:11<br>
>> Andy<br>
>>>>      Green<br>
>>>>       >      >             <<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>><br>
>>>>       >      >              >> >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>>><br>
>>>>       >      >              >> >      > <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<br>
>>> <a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>>>>><br>
>>> wrote:<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     On 05/23/2016 11:37 PM,<br>
>> Andy<br>
>>>>      Green<br>
>>>>       >     wrote:<br>
>>>>       >      >              >> >      >      ><br>
>>>>       >      >              >> >      >      ><br>
>>>>       >      >              >> >      >      > On May 23, 2016<br>
>> 9:14:57 PM<br>
>>>>      GMT+08:00,<br>
>>>>       >      >             Colin Adams<br>
>>>>       >      >              >> >      >      ><br>
>> <<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>>><br>
>>>>       >      >              >> ><br>
>> <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>>>><br>
>>>>       >      >              ><mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>>><br>
>>>>       >      >              >> ><br>
>> <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>><br>
>>>>       >     <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a><br>
>>>>      <mailto:<a href="mailto:colinpauladams@gmail.com" target="_blank">colinpauladams@gmail.com</a>>>>>>> wrote:<br>
>>>>       >      >              >> >      >      >> This sounds like<br>
>>>>      something that<br>
>>>>       >     I was<br>
>>>>       >      >             going to have<br>
>>>>       >      >              >to<br>
>>>>       >      >              >> >     write myself<br>
>>>>       >      >              >> >      >      >> for my application<br>
>> (a game<br>
>>>>       >     server). I<br>
>>>>       >      >             can't think<br>
>>>>       >      >              >offhand<br>
>>>>       >      >              >> >     of any<br>
>>>>       >      >              >> >      >      >> further<br>
>> improvements, but<br>
>>> I<br>
>>>>       >     might find<br>
>>>>       >      >             something<br>
>>>>       >      >              >when I<br>
>>>>       >      >              >> >     try it<br>
>>>>       >      >              >> >      >      >> out. My C skills are<br>
>> 17<br>
>>>>      years rusty<br>
>>>>       >      >             (apart from<br>
>>>>       >      >              >fragments<br>
>>>>       >      >              >> >     involved<br>
>>>>       >      >              >> >      >      >> in writing language<br>
>>>>      bindings),<br>
>>>>       >     but I'm<br>
>>>>       >      >             sure I can<br>
>>>>       >      >              >polish<br>
>>>>       >      >              >> >     them up if<br>
>>>>       >      >              >> >      >      >> I find any<br>
>> enhancements<br>
>>>>      needed.<br>
>>>>       >     Is this<br>
>>>>       >      >             in master<br>
>>>>       >      >              >now?<br>
>>>>       >      >              >> >      >      ><br>
>>>>       >      >              >> >      >      > No, it's very much a<br>
>> WIP.<br>
>>>>       >      >              >> >      >      ><br>
>>>>       >      >              >> >      >      > But today it's<br>
>> working for<br>
>>>>      admin<br>
>>>>       >     login /<br>
>>>>       >      >             logout, the<br>
>>>>       >      >              >> cookies,<br>
>>>>       >      >              >> >      >      > persistent session<br>
>> db,<br>
>>>>      rewriting r/o<br>
>>>>       >      >             copies of the<br>
>>>>       >      >              >state<br>
>>>>       >      >              >> >     into js vars<br>
>>>>       >      >              >> >      >      > (so the example login<br>
>> page<br>
>>>>      js can<br>
>>>>       >     change<br>
>>>>       >      >             to a logout<br>
>>>>       >      >              >form<br>
>>>>       >      >              >> >      >      > appropriately), and<br>
>> all<br>
>>>>       >     customization in<br>
>>>>       >      >             the lwsws<br>
>>>>       >      >              >JSON<br>
>>>>       >      >              >> >     and login<br>
>>>>       >      >              >> >      >      > html (there are<br>
>> hidden<br>
>>>>      form elements<br>
>>>>       >      >             that control the<br>
>>>>       >      >              >next<br>
>>>>       >      >              >> url<br>
>>>>       >      >              >> >      >      > depending on how the<br>
>> login<br>
>>> /<br>
>>>>       >     logout went).<br>
>>>>       >      >              >> >      >      ><br>
>>>>       >      >              >> >      >      > I'll tidy it up and<br>
>> add<br>
>>>>      some docs<br>
>>>>       >      >             tomorrow, and check<br>
>>>>       >      >              >if<br>
>>>>       >      >              >> >     it broke<br>
>>>>       >      >              >> >      >      > anything else, but<br>
>> you can<br>
>>> see<br>
>>>>       >     it's only<br>
>>>>       >      >             usable for<br>
>>>>       >      >              >> >     development<br>
>>>>       >      >              >> >      >      > today.<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     I pushed what there is<br>
>> of<br>
>>>>      it... for now<br>
>>>>       >      >             it's enabled in<br>
>>>>       >      >              >cmake<br>
>>>>       >      >              >> >     with<br>
>>>>       >      >              >> >      >     LWS_WITH_LWSWS.<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     See<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> ><br>
>>>>       >      >              >><br>
>>>>       >      ><br>
>>>>       ><br>
>>>>       ><br>
>>><br>
>> <a href="https://github.com/warmcat/libwebsockets/blob/master/README.generic-sessions.md" rel="noreferrer" target="_blank">https://github.com/warmcat/libwebsockets/blob/master/README.generic-sessions.md</a><br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     You can add the mounts<br>
>>>>      mentioned in<br>
>>>>       >     there<br>
>>>>       >      >             and the<br>
>>>>       >      >              >protocol<br>
>>>>       >      >              >> >     import part<br>
>>>>       >      >              >> >      >     to the existing lwsws<br>
>> example<br>
>>>>      config.<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     The admin account and<br>
>>>>      password in the<br>
>>>>       >      >             protocol config<br>
>>>>       >      >              >part is<br>
>>>>       >      >              >> >     admin /<br>
>>>>       >      >              >> >      >     jipdocesExunt<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     If you navigate to<br>
>>>>       >      > <a href="http://localhost:7681/lwsgs" rel="noreferrer" target="_blank">http://localhost:7681/lwsgs</a> you<br>
>>>>       >      >              >should see<br>
>>>>       >      >              >> >     a login<br>
>>>>       >      >              >> >      >     form that you can login<br>
>> with<br>
>>>>      those<br>
>>>>       >      >             credentials, which<br>
>>>>       >      >              >will<br>
>>>>       >      >              >> >     take you to a<br>
>>>>       >      >              >> >      >     URL in<br>
>> /lwsgs/needadmin/...<br>
>>>>      that cannot<br>
>>>>       >      >             otherwise be<br>
>>>>       >      >              >served.<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     If you go back and<br>
>> refresh<br>
>>>>      the login<br>
>>>>       >     page,<br>
>>>>       >      >             it now knows<br>
>>>>       >      >              >your<br>
>>>>       >      >              >> >     session is<br>
>>>>       >      >              >> >      >     authenticated and this<br>
>> time<br>
>>>>      shows your<br>
>>>>       >      >             login name<br>
>>>>       >      >              >together<br>
>>>>       >      >              >> >     with a logout<br>
>>>>       >      >              >> >      >     button... this is done<br>
>> in JS<br>
>>>>      clientside<br>
>>>>       >      >             with the tiny<br>
>>>>       >      >              >rewrite<br>
>>>>       >      >              >> of<br>
>>>>       >      >              >> >      >     "$lwsgs_user" in the<br>
>> included<br>
>>>>      lwsgs.js.<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     The active sessions are<br>
>>> stored in<br>
>>>>       >     sqlite3<br>
>>>>       >      >             on the server<br>
>>>>       >      >              >side<br>
>>>>       >      >              >> >     and the<br>
>>>>       >      >              >> >      >     expiry, controlled from<br>
>> the<br>
>>>>      config file,<br>
>>>>       >      >             should be<br>
>>>>       >      >              >respected.<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     The actual users will<br>
>> also go<br>
>>>>      in a<br>
>>>>       >     table in<br>
>>>>       >      >             sqlite3, but<br>
>>>>       >      >              >> admin's<br>
>>>>       >      >              >> >      >     credentials are set in<br>
>> the<br>
>>> config<br>
>>>>       >     outside<br>
>>>>       >      >             of that.<br>
>>>>       >      >              >Those<br>
>>>>       >      >              >> >     users and<br>
>>>>       >      >              >> >      >     registration aren't done<br>
>> yet.<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >      > I'm mainly wondering<br>
>> what<br>
>>>>      people want<br>
>>>>       >      >             from the<br>
>>>>       >      >              >persistent<br>
>>>>       >      >              >> >     user state,<br>
>>>>       >      >              >> >      >      > in my case once<br>
>>> authenticated,<br>
>>>>       >     the next<br>
>>>>       >      >             url is an<br>
>>>>       >      >              >html<br>
>>>>       >      >              >> >     page opening a<br>
>>>>       >      >              >> >      >      > ws link that will<br>
>> also get<br>
>>> the<br>
>>>>       >     logged-in<br>
>>>>       >      >             session<br>
>>>>       >      >              >cookie.<br>
>>>>       >      >              >> My<br>
>>>>       >      >              >> >      >      > application is static<br>
>> html<br>
>>>>      + js that<br>
>>>>       >      >             dynamically<br>
>>>>       >      >              >> >     configures itself<br>
>>>>       >      >              >> >      >      > around the returned<br>
>>>>      (user-context<br>
>>>>       >     aware)<br>
>>>>       >      >             JSON from<br>
>>>>       >      >              >the ws<br>
>>>>       >      >              >> >     link.<br>
>>>>       >      >              >> >      >      ><br>
>>>>       >      >              >> >      >      > Put another way the<br>
>>>>      application's<br>
>>>>       >     custom<br>
>>>>       >      >             ws protocol<br>
>>>>       >      >              >> >     handler code is<br>
>>>>       >      >              >> >      >      > the guy who actually<br>
>>>>      defines what<br>
>>>>       >      >             different users<br>
>>>>       >      >              >see...<br>
>>>>       >      >              >> >     that pattern<br>
>>>>       >      >              >> >      >      > removes the need for<br>
>> any<br>
>>> other<br>
>>>>       >     server-side<br>
>>>>       >      >              >interpreter and<br>
>>>>       >      >              >> >     just<br>
>>>>       >      >              >> >      >      > manifests itself as<br>
>>>>      delivering an<br>
>>>>       >      >             authenticated<br>
>>>>       >      >              >username<br>
>>>>       >      >              >> >     into custom<br>
>>>>       >      >              >> >      >      > ws protocol code you<br>
>> would<br>
>>>>      have<br>
>>>>       >     to write<br>
>>>>       >      >             anyway.<br>
>>>>       >      >              >Other<br>
>>>>       >      >              >> >      >      > presentation-related<br>
>> code<br>
>>> that<br>
>>>>       >     needs to<br>
>>>>       >      >             be aware of<br>
>>>>       >      >              >> >     authentication<br>
>>>>       >      >              >> >      >      > state (eg, show login<br>
>>> form, or<br>
>>>>       >     "logged<br>
>>>>       >      >             in as xxx" +<br>
>>>>       >      >              >logout<br>
>>>>       >      >              >> >     button)<br>
>>>>       >      >              >> >      >      > moves out of what<br>
>> would<br>
>>>>      have been<br>
>>>>       >     server<br>
>>>>       >      >             scripts and<br>
>>>>       >      >              >into<br>
>>>>       >      >              >> >     js that got<br>
>>>>       >      >              >> >      >      > some rewriting pixie<br>
>>>>      dust.  But I am<br>
>>>>       >      >             curious if that<br>
>>>>       >      >              >> >     pattern is<br>
>>>>       >      >              >> >      >      > enough to solve other<br>
>>> peoples'<br>
>>>>       >      >             session-related tasks,<br>
>>>>       >      >              >> >     perhaps with a<br>
>>>>       >      >              >> >      >      > little thought.<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     Still curious about<br>
>> opinions<br>
>>>>      on this<br>
>>>>       >     (maybe<br>
>>>>       >      >             it's not<br>
>>>>       >      >              >> >     explained clearly<br>
>>>>       >      >              >> >      >     enough yet).<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >     -Andy<br>
>>>>       >      >              >> >      ><br>
>>>>       >      >              >> >      >      > -Andy<br>
>>>>       >      >              >> >      >      ><br>
>>>>       >      >              >> >      >      >> On Mon, 23 May 2016<br>
>> at<br>
>>> 12:44<br>
>>>>       >     Andy Green<br>
>>>>       >      >              ><<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>><br>
>>>>       >      >              >> >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>>><br>
>>>>       >      >              >> >      >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>><br>
>>>>       >     <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>><br>
>>>>       >      >             <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>> <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a><br>
>>>>      <mailto:<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>>>>>>><br>
>>>>       >      >              >wrote:<br>
>>>>       >      >              >> >      >      >><br>
>>>>       >      >              >> >      >      >>> Hi -<br>
>>>>       >      >              >> >      >      >>><br>
>>>>       >      >              >> >      >      >>> I am partway<br>
>> through<br>
>>>>      making a<br>
>>>>       >     plugin<br>
>>>>       >      >             called<br>
>>>>       >      >              >> >     "generic-sessions",<br>
>>>>       >      >              >> >      >      >> intended<br>
>>>>       >      >              >> >      >      >>> to provide<br>
>> lightweight<br>
>>>>       >     persistent http<br>
>>>>       >      >             sessions<br>
>>>>       >      >              >without a<br>
>>>>       >      >              >> >      >      >>> server-side<br>
>> interpreter.<br>
>>>>       >      >              >> >      >      >>><br>
>>>>       >      >              >> >      >      >>> The overall ideas<br>
>> are:<br>
>>>>       >      >              >> >      >      >>><br>
>>>>       >      >              >> >      >      >>> - random 20-byte<br>
>> session<br>
>>> id<br>
>>>>       >     managed in<br>
>>>>       >      >             a cookie<br>
>>>>       >      >              >> >      >      >>><br>
>>>>       >      >              >> >      >      >>> - all information<br>
>>>>      related to the<br>
>>>>       >      >             session held at<br>
>>>>       >      >              >the<br>
>>>>       >      >              >> server,<br>
>>>>       >      >              >> >      >      >> nothing<br>
>>>>       >      >              >> >      >      >>> managed clientside<br>
>>>>       >      >              >> >      >      >>><br>
>>>>       >      >              >> >      >      >>> - sqlite3 used at<br>
>> the<br>
>>>>      server to<br>
>>>>       >     manage<br>
>>>>       >      >             active<br>
>>>>       >      >              >sessions<br>
>>>>       >      >              >> >     and users<br>
>>>>       >      >              >> >      >      >>><br>
>>>>       >      >              >> >      >      >>> - defaults to<br>
>> creating<br>
>>>>      anonymous<br>
>>>>       >      >             sessions with no<br>
>>>>       >      >              >user<br>
>>>>       >      >              >> >      >      >>> associated<br>
>>>>       >      >              >> >      >      >>><br>
>>>>       >      >              >> >      >      >>> - admin account<br>
>> (with<br>
>>>>       >     user-selectable<br>
>>>>       </blockquote></div>