[Maypole] Maypole Auth Oddity
Christopher Hicks
chicks@chicks.net
Sat, 26 Feb 2005 22:01:17 -0500 (EST)
I've been trying to use Maypole::Plugin::Authorization to control access
to the Maypole application I'm developing. Here's an excerpt from my
code:
use Maypole::Application qw(Authentication::UserSessionCookie Authorization);
sub authenticate {
my ($self, $r) = @_;
$r->get_user;
if ($self->authorize($r)) {
return OK;
} else {
# take application-specific authorization failure action
$r->{template} = 'login';
return 0;
}
}
When I try to actually login I get the message in the error_log:
[Sat Feb 26 21:35:58 2005] [error] [client 205.166.143.252] caught
authenticate error: Can't locate object method "search" via package
"FINI::FiniLever::Maypole::User" (perhaps you forgot to load
"FINI::FiniLever::Maypole::User"?) at
/usr/lib/perl5/site_perl/5.8.3/Maypole/Plugin/Authentication/UserSessionCookie.pm
line 147., referer: http://www.finilever.com/cgi/test/frontpage
I've dug around the MPA and MPA:USC docs without finding anything to clue
me in. I've skimmed relevant-seeming portion of the source code for both
without any bright lights coming on either. Can someone point me in the
right direction, please?
--
</chris>
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)