[Phplib-users] Re: [phplib] current users?
Brought to you by:
nhruby,
richardarcher
From: giancarlo p. <gia...@na...> - 2001-08-22 12:12:28
|
What I propose is to make Auth a very aseptic class. Kind of client-server. Loosely coulpled. No html ouptut, no form handling. That stuff should be handled, eventually, by the application, maybe in page.inc. (if it is a web application... Auth has to be a more abstract concept). If we think to auth as a client-server commodity, what requests auth (the application), is the client. PHPlib Auth is the server. So Client (application) side, anyway And every login/logout being written in a log file This would solve all the problems with poping-out pages, back/cancel-login buttons, log/reg mode. In the sense that these have to be handled application-side. I have already tranformed it this way,, for my use. I got some ideas from http://www-106.ibm.com/developerworks/webservices/library/ws-xpc2/ and http://www-106.ibm.com/developerworks/webservices/library/ws-xpc2/listing2.html Basically three methods: authenticate (an alias for start()) get_account_info set_account_info I wrote a lot about this ("Auth: I will not give up on this") on phplib-core, but nobody commented. PEAR Auth is wrong too, in this light, because it handles form output, with error message, etc I attach the auth.inc I have been playing with a few hours only (not too checked..), and page inc. Giancarlo Kristian Koehntopp wrote: > > On Tue, Aug 21, 2001 at 10:32:21PM -0700, Bryan McGuire wrote: > > Due to the stateless nature of http, this is dodgy at best. You > > understand this, and you need to educate your client on the nature of > > http and its limitations. Suppose that I am browsing an online store > > and the phone rings. > > While you cannot tell who is currently "online" due to the > stateless nature of http, you could in theory tell which users > currently have valid authentications. PHPLIB does not properly > support this, though, because this is a vertical query and > PHPLIB keeps authentication data in a unstructured session BLOB > which does not lend itself well to any kind of vertical query. > > We already had a similar discussion a few weeks ago on this > list. > > If you want to be able to answer such questions as "how many > users are currently authenticated", you need to keep > authentication data outside of the session BLOB in a structured > table. Only then you will be able to run vertical queries on > such data efficiently. This is effectively a major rewrite of > Auth, or a very large subclass of Auth. > > Kristian > > -- > Abbestellen mit Mail an: php...@li... > Kommandoliste mit Mail an: php...@li... |