[Catalyst] Authentication not working as expected

Steve steve at matsch.com
Tue Jan 11 17:20:29 GMT 2011


Ben,

I understand how frustrating it is to get started, having done so myself 
fairly recently.

That said, I don't know what help you want.  It appears that you may be 
trying to implement the authentication to the application 'DBAuthTest', 
but your application, (which I downloaded and ran) has no facility for 
loggin in a user.  There are no login templates, no actions for logging 
in, etc.  Furthermore, the authentication plugin is missing.

I would suggest continuing on in the book through Chapter eight 
(SneakyCat), as this application does authentication and authorization.  
It may provide you the 'missing bits' you need to customize the app from 
Ch. 6.

P.S. I noticed that the application has yesterday's date on it.  Is 
there any chance you uploaded an old version???

Steve
Steve Schafer
Matsch Systems
Phone: 616-477-9629
Mobile: 616-304-9440
Email: steve at matsch.com
Web: http://www.matsch.com/


On 1/11/2011 11:09 AM, Ben Lavery wrote:
> Dear all,
>
> After installing Catalyst on an OpenIndiana virtual machine, I've been working through the Definitive Guide to Catalyst for the last few weeks and have been impressed with how smoothly most of it has gone.
>
> I have, however, become unstuck at Chapter 6.  The book explains how to create an application that uses some simple CRUD with user and role data, and uses authentication to prevent users updating other user's data.
> I have a working application that allows one to create and read user data, but I can't figure out how to apply the authentication.  The book says:
> "When using the Authentication plug-in, as we showed in Chapter 3..."
>
> I've gone back to Chapter 3 and followed the steps, but I'm not sure where I am supposed to put the "$c->authenticate".
> If I place it in DBAuthTest::Controller::Root in a subroutine called "auto", every page on the site needs me to log in, but no matter what I put in the username and password fields it says that the data is invalid.
> As such I have no idea where I have gone wrong, after Googling I can't find similar problems, or people who have had similar problems or implemented a similar system in a similar way.
> I have looked at the source code provided on the publisher's site, but it doesn't include code for the whole chapter, and indeed seems to stop given code a page or two previous to where I am now...
>
> I have uploaded a copy of my application to http://hashbang0.com/personal/DBAuthTest.tar.bz2 (~46K) which I hope help demonstrate where I am currently.
>
> Many thanks for your time, I appreciate any help you can give,
>
> Ben Lavery
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>



More information about the Catalyst mailing list