[Maypole] Maypole Auth Oddity
Dave Howorth
Dave.Howorth@acm.org
Sun, 27 Feb 2005 17:14:54 +0000
Christopher Hicks wrote:
> 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?
The most relevant bit of the source code is the line where the error
occurred and immediately above it. M-P-A-UserSessionCookie needs various
values in config->auth that match your actual configuration. The line
that failed was trying to invoke CDBI's search method on a model class
and the name of that model class is fetched from config->auth a few
lines above. So I would guess you haven't set the auth configuration, in
particular the user_class key. There's a Configuration section in the
UserSessionCookie doc that explains what it needs. M-P-Authorization
will use the same user_class key to determine a class for its purposes,
when your code gets far enough to call it.
Cheers, Dave
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.5.0 - Release Date: 25/02/05