[pmwiki-users] LDAP / PAM Module
Joachim Durchholz
jo at durchholz.org
Thu Aug 4 10:28:03 CDT 2005
Patrick R. Michaud wrote:
> On Thu, Aug 04, 2005 at 04:28:46PM +0200, Joachim Durchholz wrote:
>
>>One thing that I noted in passing: the script doesn't (seem to) have a
>>good interface for plugging in one's own authentication methods. People
>>may want to write authenticators for text files, maybe even hardcoded
>>ones with the passwords in the PHP source, or whatever.
>
> How about...
>
> $AuthUser['custommethod'] = 'details for custommethod';
> include_once('scripts/authuser.php');
Maybe
include_once('scripts/authuser.php');
$AuthUser['custommethod'] = 'Auth_function';
with
function AuthFunction (<any necessary parameters>)
{
...
}
The first parameter may have to determine what kind of activity to do
(check authentication, change password, maybe others).
> # perform authentication specific stuff here
> if ($AuthUser['custommethod']) {
> /* test for authentication */
> if ( /*authenticated*/ ) AuthenticateUser($id);
> }
I have to admit I don't understand this code. Here's how things would
look from my perspective:
$AuthFunction = $AuthUser['custommethod'];
if ($AuthFunction(parameters)) {
/* We're authenticated; or: password change successful */
} else {
/* We're not authenticated; resp.: password change failed */
}
Regards,
Jo
More information about the pmwiki-users
mailing list