External Authentication by PAM

apacheguy

Joined: 2013-01-01
Posts: 2
Posted: Fri, 2013-01-18 07:24

So basically I'm trying to integrate Gallery 3 with my existing website, which authenticates users by a php script. Ideally, I don't want users to have to login twice to access the gallery.

The module closest to what I'm looking for seems to be PAM. However, I'm not really experienced with php, nor the Gallery api so I haven't been able to write a PAM plugin successfully. Essentially what I want it to do is the following:

Quote:
if ($function->user_authenticated) {
// send authentication code to Gallery so we can bypass the integrated auth page
auth::login($function->user_name);
$valid = true;
} else {
// redirect the user to a login page
}

What I'm not sure about is how to send the message to Gallery that the user has been authenticated. Those lines of code don't do it for me.

Thanks for the help.