[Phplib-users] Mo: auth->check_feature and different expires
Brought to you by:
nhruby,
richardarcher
|
From: Giancarlo <gia...@na...> - 2002-10-08 10:35:03
|
The real question should be: wouldn't it be better, as a design, to store= the=20 session's expiration update time (the start time from which to calculate = the=20 expiration), instead of the time when it's due to expire? And each auth c= lass=20 instead of relying on a sum already made, resums that and decides? Because we inherit the exp time, but cannot know when that was extended, = and=20 if, for our actual lifetime, that would be too late. Gian Il 12:16, marted=EC 8 ottobre 2002, Giancarlo ha scritto: > I was now trying the snapshot with the aim of providing a different exp= ire > for eg user kris (admin), than anoter user (not admin). > > So I defined the Example_Auth (eg the one used in admin_only showoff) w= ith > a lifetime=3D1, and a example_default_auth (the one used in the pages = for > 'nobodies' too) with a lifetime of 3 minutes. > > But when I am visiting, as admin, a page that is for default_auth, my > lifetime gets extended to that of the defauth class, because it's in th= e > persistent $auth->auth array. While I would be able to keep my 'admin' > one. So maybe the check feature should also check, if different auth > feature, also recalclate the $auth->auth[exp] inherited. > > > Gian |