[Phplib-users] new.auth.inc
Brought to you by:
nhruby,
richardarcher
|
From: Andrey L. <an...@nk...> - 2002-06-10 09:45:58
|
Hi,=20
I like an idea of new auth class by Giancarlo, but i'm actually can't
make it work as i wish. I hope Gian or any body who are using this patch
can help...:)
I'm currently starting a new project. Authentication is supposed to look
like in phpNuke or such. I mean anonymous users will see login box
somewere, but after they presses submit button (in any page), box
disappears.
So i override Auth as follows:
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
class Auth_MW extends Auth {
var $classname =3D "Auth_MW";
var $lifetime =3D 0;
var $nobody =3D false;
function auth_preauth() {
print "Preauth<br>";
}
function auth_validatelogin() {
print "validatelogin.<br>";
}
function auth_loginform() {
print "this is a login form.<br>";
}
}
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
now when $nobody is false, the last thing outputed is "this is a login
form.".
when $nobody us set to true, i see whole page, but nothing except
auth_preauth is calling.
So i want to ask how to implement authentication in a RIGHT way. Of
course i could check was there form submittion in a auth_preauth and
then try to auth_validatelogin... But how do you suggests?
Thanks.
P.S. sorry for bad english...:) i hope you understand me
--=20
Andrey Lebedev
Naujoji Komunikacija
|