Hi Raj,<br>
<br>
I am attempting a similar thing. I have hooked some code into
auth/index.php as you suggest which confirms whether a user still has
credit remaining (I am only implementing data usage restrictions)
before allowing continued access. I added a data_credit field to the
users table to store this credit information. When the session ends
(authenticator-&gt;logout() and
includes/common.php-&gt;garbage_collect() methods from memory) I update
this field with session data (from connections table).<br>
<br>
A couple of issues with my implementation - because data usage is only
updated every XX seconds a user can exceed their data limit for XX
seconds before they are kicked off. I don't consider this a major issue
and for my needs it is near enough. However, if you require totally
accurate data accounting my implementation would not be suitable. To a
degree this could be mitigated by lowering the ping/auth timing,
however doing so could potentially place considerable load on your auth
server (as all nodes will be pinging and sending auth requests more
frequently). Also, disallowing users suddenly when their credit expires
seems a little unfriendly. I think a two stage credit expiration will
be necessary - warning at XX MB remaining to give the user a chance to
add more credit to their account.<br><br>
I guess a timing based authentication would also be possible along
similar lines. Store a running total of time user has been connected
and log them out when their limit has been exceeded - time remaining ==
0. One issue to consider is that if a node goes down while a time
restricted user is logged in the auth server will need to account for
how long said user was logged in. I guess you could utilize the time of
last heartbeat from given node and integrate this into your time based
accounting system? I haven't looked at the connections table/data at
all with a view to using time based restrictions so I could be well off
the mark here and it may just work 'as is' if you deem the user to have
been logged in up until the time of their last heartbeat rather than
the TIMESTAMP_OUT value (which may be set later by garbage_collect).<br>
<br>
Okay, I think this email could very easily end up a rambling mess as I
continue to think out loud. I hope at least some of my comments are
correct and useful for you. If you have any questions don't hesitate to
ask.<br>
<br>
DISCLAIMER: I am pretty new to this myself so am still attempting to
get my head around things. Anyone who has any better ideas or can
correct me, please do so!<br>
<br>
Tarken<br>
<br>
<br><div><span class="gmail_quote">On 7/13/06, <b class="gmail_sendername">Alexis Cornellier</b> &lt;<a href="mailto:alexis.cornellier@gmail.com">alexis.cornellier@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hey, anyone, can you answer that guy? he seems to want to do something that we want for long time here at ISF operation.<br>
<br>
Alexis</div><div><span class="e" id="q_10c6469217bfb9bf_1"><br><br><div><span class="gmail_quote">On 7/12/06, <b class="gmail_sendername">Rajkumar S.</b> &lt;<a href="mailto:rajkumars@asianetindia.com" title="mailto:rajkumars@asianetindia.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
rajkumars@asianetindia.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I have a requirement to terminate customer's connection based on<br>either download limit or usage time. As far as I understand this is<br>not possible with wifidog. So I am trying to add support for these,<br>

and if possible support for prepaid tokens and pins also.<br><br>I am going through the code trying to read and understand. My idea is<br>to hook the limit checking into auth/index.php after the call to<br>$authenticator-&gt;acctStart
<br><br>I will add another method to authenticator to check if the user has<br>exceeded the defined limits.<br><br>I am just checking if there are any existing plans/designs to get this<br>done. As far as possible I want to make sure that what I do is
<br>compatable with the overall design of wifidog so that it can be<br>intagrated into the code base.<br><br>I also want the meaning of Network, node, portal and content in the<br>context of wifidog. I have some vague idea and understanding but
<br>getting a canonical def can help a lot in clarifying the concept.<br><br>Right now when I try to browse from a machine I get the wifidog login<br>page but after logging I am not redirected to the url that I was<br>trying to browse, but to the logged in page. what I want is to get a
<br>popup with the logout button and the browser should proceed to the url<br>I had originally typed.<br><br>with regards,<br><br>raj<br><br><br><br>_______________________________________________<br>WiFiDog mailing list
<br>
<a href="mailto:WiFiDog@listes.ilesansfil.org" title="mailto:WiFiDog@listes.ilesansfil.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">WiFiDog@listes.ilesansfil.org</a><br><a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" title="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a>
<br></blockquote></div><br><br clear="all"><br></span></div><div><span class="sg">-- <br>Alexis Cornellier<br>327 53eme Avenue<br>Pointe-Calumet, Québec<br>J0N 1G4<br>(450) 623-8454

</span></div><br>_______________________________________________<br>WiFiDog mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br><br>
</blockquote></div><br>