[Catalyst] Announce: Last Call - RC of C::P::Authentication

Jay K jayk at ion0.com
Tue Jul 10 22:56:57 GMT 2007


Hey all - Just a followup to the list.

The issue here is that Michael's module did not cal the
default_auth_store routine - which meant it was never set up as the
default store.

There is a side effect of the old configuration method for multiple
stores that caused his class-name to be used in place of the store
backend object.  In his particular case, this worked under the old
module.  Unfortunately, the same side-effect is not present in the
new module.  We solved it by adding a simple setup sub to his store
that just calls default_auth_store with his class name.

Please note that this is the one area where backwards compatibility
was not maintained.  The method for multiple stores in the old module
does NOT work in the new module.   To use multiple stores on the
updated module, you will need to use the Realms functionality.

I've done my best to maintain the side-effects of those variables -
but it may or may not work.  If you use the multiple store
functionality with the old C::P::Authentication along with modules
are not yet updated to work with Realms, I would suggest that you do
not update. Configurations that use the 'store' and 'stores'
configuration variables will most likely not work.

I don't expect that there are a ton of people using that
functionality as it required a bit of hackery to get working under
the old module.... but on the off chance, I wanted this information
'out there'.

I have not heard any other bug reports - If no one complains before
then, I will be pushing the new module live tomorrow morning (CST)

JayK

On Jul 9, 2007, at 2:43 PM, Michael Reece wrote:

> empty hashref:  {}
>
> some details about MyApp:
>
> use MyApp::Plugin::Authentication::DBI::User;    # $c->user class
>
> use Catalyst (
>         # ...
>     'Authentication',                           # Implements $c->user
>     '+MyApp::Plugin::Authentication::DBI',       # Implements $c-
> >login
>         # ...
> );
>
> __PACKAGE__->config(
>         # ...
>     authentication => { store =>
> 'MyApp::Plugin::Authentication::DBI::User' },
>         # ...
> );
>
>
> 'sub login' is implemented in MyApp::Plugin::Authentication::DBI,
> and does
>     my $user_obj = $c->get_user($user, $password);
>
> which i expect to ultimately call
> MyApp::Plugin::Authentication::DBI::User->get_user() but it does not.
>
> a 'warn Data::Dump::dump($c->auth_realms);' just before $c-
> >get_user yields {}
>
>
> On Jul 9, 2007, at 11:40 AM, Jay K wrote:
>
>> Hi Michael,
>>
>> Can you tell me what $c->auth_realms returns?
>>
>> Thanks,
>>
>> JayK
>>
>> On Jul 9, 2007, at 12:34 PM, Michael Reece wrote:
>>
>>> the short answer is it does not call my store's get_user method,
>>> despite
>>>
>>>   __PACKAGE__->config(
>>>     authentication => { store =>
>>> 'MyApp::Plugin::Authentication::DBI::User'}
>>>   );
>>>
>>> the error i get is:
>>>
>>> [debug] find_user: unable to locate a store matching the requested
>>> realm
>>>
>>>
>>> the new docs suggest that i shouldn't need to make any changes for
>>> backwards compatibility..?
>>>
>>> On Jul 9, 2007, at 9:46 AM, Michael Reece wrote:
>>>
>>>> this does break my custom authentication.  i am still
>>>> investigating why..
>>>>
>>>> On Jul 7, 2007, at 12:50 PM, Jay K wrote:
>>>>
>>>>> Hey all,
>>>>>
>>>>> Big news!  With the most excellent assistance of J. Shirley and
>>>>> Nilson Santos Figueiredo Junior - The new C::P::Authentication
>>>>> finally has all it's tests and, we feel, is ready for release.
>>>>>
>>>>> Thus - the Release Candidate is now on CPAN at:
>>>>>
>>>>> http://search.cpan.org/~jayk/Catalyst-Plugin-
>>>>> Authentication-0.09999_02/
>>>>>
>>>>> For those of you using custom, or unusual stores or credentials -
>>>>> PLEASE TEST THIS in your config!  The update makes a lot of
>>>>> changes
>>>>> to the internals of the authentication system, and while there
>>>>> is a
>>>>> compatibility mode which should maintain functionality with older
>>>>> modules - only a handful have actually been tested.
>>>>>
>>>>> So again - if you have a custom store or credential, or you use
>>>>> something aside from the DBIC store module and
>>>>> Password credential - it's a very VERY good idea to test
>>>>> against the
>>>>> updated C::P::Authentication module.
>>>>>
>>>>> If nobody shouts 'stop the presses' in the next couple of days, we
>>>>> will be doing a full release and bumping the CPAN version next
>>>>> week.
>>>>>
>>>>> For those who have authored Stores or Credentials - it's
>>>>> probably a
>>>>> good idea to look at:
>>>>>
>>>>> http://tinyurl.com/3x5yu3  (C::P::A::Internals)
>>>>>
>>>>> to better understand how the new system works and how to update
>>>>> your
>>>>> modules for compatibility.  Modules that are not updated will
>>>>> continue to work in compatibility mode, but will not allow
>>>>> users to
>>>>> take advantage of the new Realms features.
>>>>>
>>>>> Again, PLEASE TEST this module with your apps!  We will most
>>>>> likely
>>>>> release mid-week if we get no bug reports!
>>>
>>>
>>> _______________________________________________
>>> List: Catalyst at lists.rawmode.org
>>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>>> Searchable archive: http://www.mail-archive.com/
>>> catalyst at lists.rawmode.org/
>>> Dev site: http://dev.catalyst.perl.org/
>>
>> ---
>> "May we not return to those scoundrels of old, the illustrious
>> founders of superstition and fanaticism, who first took the knife
>> from the altar to make victims of those who refused to be their
>> disciples." - Voltaire
>>
>>
>
> ---
> michael reece :: software engineer :: mreece at vinq.com
>

---
For most things, throwing yourself at the wall over and over is a
better way to improve than thinking hard about the wall and taking
pictures of it.  -- D.Litwack





More information about the Catalyst mailing list