Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: [Catalyst] authenticate called with nonexistant realm: 'default'

by Your Mother (Archbishop)
on Apr 14, 2014 at 18:23 UTC ( [id://1082271]=note: print w/replies, xml ) Need Help??


in reply to [Catalyst] authenticate called with nonexistant realm: 'default'

Are you using an older version of the plugin, Catalyst::Plugin::Authentication?

Until version 0.10008 of this module, you needed to put all the realms inside a "realms" key in the configuration.

If so, you can either upgrade or try…

__PACKAGE__->config( 'Plugin::Authentication' => { use_session => 1, default_realm => 'default', realms => { default => { credentials => { class => 'Password'…

Replies are listed 'Best First'.
Re^2: [Catalyst] authenticate called with nonexistant realm: 'default'
by mcso (Novice) on Apr 15, 2014 at 06:25 UTC
    I am using version 0.10023.
    I have tested with the pre version 0.10008 of the configuration, just to be sure, but no luck.
    I have also tried to put the configuration in the same file as my login function (don't know if that can make any difference?), but it still doesn't seem to find the realm 'default', or any other I might put in.

      I messed around with this a little bit more last night but had exactly the same experience you did. There seems to be something wrong with the docs or a newish bug. I have used the auth package in lots of places without problems before so it's probably something simple that's missing/wrong. I won't have time to look at this today but if no one else chimes in I will try again when I can.

        I have finally found my mistake, and damn I feel stupid now...
        In the configuration of my default realm, I have a credentials where it should have been credential ... the documentation also uses the singular form.
        I noticed it by going through Catalyst/Plugin/Authentication.pl, looking at the initialization code (_authentication_initialize()). For each found possible realm, it looks for either credential or class exists. As bonus info, it looks like the module still supports putting all of your realms inside a realms hash.
        Thank you for your time, I will go back and bash my head against the wall..

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1082271]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found