Catalyst-Authentication-Store-DBIx-Class

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        Remember, what you get when you use this module is what you would
        get when calling search(...)->first;

        NOTE ALSO: The user info used to save the user to the session and to
        retrieve it is the same regardless of what method of retrieval was
        used. In short, the value in the id field (see 'id_field' config
        item) is used to retrieve the user from the database upon restoring
        from the session. When the DBIx::Class storage module does this, it
        does so by doing a simple search using the id field. In other words,
        it will not use the same arguments you used to request the user
        initially. This is especially important to those using the advanced
        methods of user retrieval. If you need more complicated logic when
        reviving the user from the session, you will most likely want to
        subclass the Catalyst::Authentication::Store::DBIx::Class::User
        class and provide your own for_session and from_session routines.

METHODS
    There are no publicly exported routines in the DBIx::Class
    authentication store (or indeed in most authentication stores). However,
    below is a description of the routines required by
    Catalyst::Plugin::Authentication for all authentication stores. Please
    see the documentation for Catalyst::Plugin::Authentication::Internals
    for more information.

  new ( $config, $app )
    Constructs a new store object.

  find_user ( $authinfo, $c )
    Finds a user using the information provided in the $authinfo hashref and
    returns the user, or undef on failure. This is usually called from the
    Credential. This translates directly to a call to
    Catalyst::Authentication::Store::DBIx::Class::User's load() method.

  for_session ( $c, $user )
    Prepares a user to be stored in the session. Currently returns the value
    of the user's id field (as indicated by the 'id_field' config element)

  from_session ( $c, $frozenuser)
    Revives a user from the session based on the info provided in
    $frozenuser. Currently treats $frozenuser as an id and retrieves a user
    with a matching id.

  user_supports
    Provides information about what the user object supports.

  auto_update_user( $authinfo, $c, $res )
    This method is called if the realm's auto_update_user setting is true.
    It will delegate to the user object's "auto_update" method.

  auto_create_user( $authinfo, $c )
    This method is called if the realm's auto_create_user setting is true.
    It will delegate to the user class's (resultset) "auto_create" method.

NOTES
    As of the current release, session storage consists of simply storing
    the user's id in the session, and then using that same id to re-retrieve
    the user's information from the database upon restoration from the
    session. More dynamic storage of user information in the session is
    intended for a future release.

BUGS AND LIMITATIONS
    None known currently; please email the author if you find any.

SEE ALSO
    Catalyst::Plugin::Authentication,
    Catalyst::Plugin::Authentication::Internals, and
    Catalyst::Plugin::Authorization::Roles

AUTHOR
    Jason Kuri (jayk@cpan.org)

LICENSE
    Copyright (c) 2007 the aforementioned authors. All rights reserved. This
    program is free software; you can redistribute it and/or modify it under
    the same terms as Perl itself.



( run in 2.325 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )