[Koha-devel] Re: [Koha] Re: MARC support

Joshua Brindle JBrindle at snu.edu
Wed Jan 15 09:41:05 CET 2003


You are right, but consider this
practically every cgi page includes C4::Auth.
Now, say i want to put in ldap authentication, i have to go modify
Auth.pm to do what I want, and if the API changes i have to go fix my
own auth.pm to continue working. the correct way to do this is to have a
wrapper that does the interface between koha and the authentication
module. you should never have to modify modules that come with koha to
make a new authentication method, it should work like this
 
app includes C4::Auth
initialize autnetication wrapper with optional argument (being the
authentication module to use)
either C4::Auth uses the module in the argument, or reverts to the
default DBI authentication
 
the default DBI authentication in C4 would inherit the methods in the
optional authentication module so that the authentication module can do
as much or as little as needed. For example, ldap would only verify the
password, and get the card number, but the other fuctions like
userflags, permissions, etc would not be overwritten and thus still
handled by the DBI authentication. Here is another example.. Most
universities have the patron information in another (possibly
proprietary) database. The proprietary database might would have the
patrons card number, and name information, but nothing else. so this
users custom authentication module would only overwrite the
getborrowernumber method, but no other. that user should be able to drop
in that 1 method and allow the default DBI authentication to do the
rest. 
 
Now, c4::auth does contain all the authentication but if the user wants
to change authentication methods he'll have to overwrite auth.pm and
possibly repeat a lot of it, or spend considable time changing all the
pages to include something other than C4::Auth. 
 
I may be rambling now, but this is how it should work, so that the
actual program is never changed so that api changes don't destroy the
systems. This should work on things other than authentication too, such
as data storage. Thanks, and i hope i didn't ramble this into confusion
:) 
 
 
 
Joshua Brindle
UNIX Administrator
Southern Nazarene University

>>> paul POULAIN <paul.poulain at free.fr> 01/15/03 09:44AM >>>
Joshua Brindle a écrit:

What is the timeline for the authentication stuff?
I've gone through some of the authentication stuff and it seems deeply
embedded (ie: not modular)
to do this right the authentication should be completely abstracted
from the app and allow a simple drop in authentication replacement. If
this were the case i'd happilly write the ldap stuff. Are there plans to
modularize all this stuff? Thanks....

Unless I'm missing something, everything around auth is done in
C4::Auth.pm package, so i don't understand why it's not modular ???

-- Paul POULAINConsultant indépendant en logiciels libresresponsable
francophone de koha (SIGB libre http://www.koha-fr.org)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20030115/1273bc81/attachment-0002.htm>


More information about the Koha-devel mailing list