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'…
  • Comment on Re: [Catalyst] authenticate called with nonexistant realm: 'default'
  • Download Code

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..