The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mango::Catalyst::Plugin::Authentication::Store - Custom Catalyst Authentication Store

SYNOPSIS

    use Catalyst qw/
        -Debug
        ConfigLoader
        +Mango::Catalyst::Plugin::Authentication
        Static::Simple
    /;

DESCRIPTION

Mango::Catalyst::Plugin::Authentication::Store is a custom authentication store that uses Mango Catalyst models to authenticate users.

To use this store, simply add it to the appropriate realm configuration:

    authentication:
      default_realm: mango
      realms:
        mango:
          credential:
            class: Password
            password_field: password
            password_type: clear
          store:
            class: +Mango::Catalyst::Plugin::Authentication::Store
            cart_model: Carts
            profile_model: Profiles
            role_model: Roles
            user_model: Users

CONFIGURATION

The following configuration options are available when using this store:

    authentication:
      default_realm: mango
      realms:
        mango:
          credential:
            class: Password
            password_field: password
            password_type: clear
          store:
            class: +Mango::Catalyst::Plugin::Authentication::Store
            cart_model: Carts
            profile_model: Profiles
            role_model: Roles
            user_model: Users

cart_model

The name of the model used to fetch carts. This model can be any model that inherits from Mango::Catalyst::Model::Carts. The default model is <Carts>.

profile_model

The name of the model used to fetch profiles. This model can be any model that inherits from Mango::Catalyst::Model::Profiles. The default model is <Profiles>.

role_model

The name of the model used to fetch user roles. This model can be any model that inherits from Mango::Catalyst::Model::Roles. The default model is <Roles>.

user_model

The name of the model used to fetch users. This model can be any model that inherits from Mango::Catalyst::Model::Users. The default model is <Users>.

CONSTRUCTOR

new

See Catalyst::Plugin::Authentication for more information about how custom stores are created and used.

METHODS

anonymous_user

Returns an AnonymousUser object for the current user.

find_user

Returns a User object for the specified username.

for_session

Returns an anonymous hash containing the current users user, role and profile information to be saved into the current users session.

from_session

Returns a CachedUser object restored from the current users session containing user, profile and role information.

user_supports

Returns a hash containing the support features.

SEE ALSO

Catalyst::Plugin::Authentication, Mango::Catalyst::Plugin::Authentication::Store Mango::Catalyst::Plugin::Authentication::User Mango::Catalyst::Plugin::Authentication::CachedUser Mango::Catalyst::Plugin::Authentication::AnonymousUser

AUTHOR

    Christopher H. Laco
    CPAN ID: CLACO
    claco@chrislaco.com
    http://today.icantfocus.com/blog/