Re[2]: [PHP-PEAR] RFC on merge of PHPLib and Pear

[email protected] (Maxim Derkachev) Fri, 9 Mar 2001 16:19:43 +0300
Newsgroups php.pear
Organization Symbol Plus Publishing Ltd.
Message-ID <[email protected]>
Hello Chuck,

Wednesday, March 07, 2001, 7:42:30 PM, you wrote:

CH> Quoting Bjцrn Schotte <[email protected]>:

>> But Auth is not a specific solution, Auth is very generic. And,
>> another reason for placing these things in PEAR/ and not in
>> PHPLib/ is that auth is such a basic thing for so many applications
>> that it should be "PEAR Auth".

CH> Can you use phplib's auth to authenticate someone by ip address? What about by 
CH> username and password but only if they're coming from a certain ip address? The 
CH> list goes on and on... it's not generic.

I'm sorry but you're wrong. Auth is an API. Main Auth methods return a
user id (if success) or false (if not). There are a lot of ways to
authenticate a user using Auth besides the way described in PHPLib docs.
Auth indeed is _very_ generic API. Write your own variant of
Auth::auth_validatelogin, etc. - and you'll have it. Core Auth class
does even know nothing about users data storage, etc. If you find a
way to pass user's fingerprints to the Auth methods, I don't see a
problem to make it work with this kind of data, using core auth class
unchanged.

-- 
Best regards,
Maxim Derkachev mailto:[email protected]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia