[Catalyst] Auth::PAM??
Michael Higgins
linux at evolone.org
Fri Nov 14 02:00:18 GMT 2008
On Thu, 13 Nov 2008 16:45:30 -0800
"J. Shirley" <jshirley at gmail.com> wrote:
> On Thu, Nov 13, 2008 at 4:28 PM, Michael Higgins <linux at evolone.org>
> wrote:
> > I had the idea to make an app that authenticates against PAM.
> >
> > Can this be done? There is Cat:P:A:C:PAM, but
> >
.... but the OP is a moron. Yes, these both work just fine.
I'm *really* sorry for the noise. I just went back and tested both with, uh, my _actual_ username and password???
So,
if ( $c->login( $user, $password ) ) {
with
__PACKAGE__->config->{'Plugin::Authentication'} =
{
default_realm => 'members',
realms => {
members => {
credential => {
class =>'PAM'
works, and so does:
if ( $c->authenticate( {username => $user, password=>$password } ) ) {
__PACKAGE ...
class =>
# 'PAM'
'Authen::Simple',
authen => [
{
'class' => 'Passwd',
'args' => {
'path' => '/etc/shadow'
}
},
So both work and work just fine.
Puzzling to me is that the latter version throws this:
Passwd path '/etc/shadow' is not readable by effective uid '1000'. at /usr/lib/perl5/vendor_perl/5.8.8/Catalyst/Authentication/Credential/Authen/Simple.pm line 29
Compilation failed in require at script/testapp_server.pl line 55.
But using the "deprecated" one doesn't, apparently, need it. Weird.
Thanks for your replies, sorry for the noise.
> "Port Catalyst::Plugin::Authentication::Credential::PAM to the new
> system. It's really simple in most cases."
I guess that is the answer, then? I guess I'll have to have a look, just as soon as I can get my head out of my, ehrm, nether parts.
As usual, Catalyst rocks.
Cheers,
--
|\ /| | | ~ ~
| \/ | |---| `|` ?
| |ichael | |iggins \^ /
michael.higgins[at]evolone[dot]org
More information about the Catalyst
mailing list