Jess Robinson > Catalyst-Plugin-Authentication-0.10007_01 > Catalyst::Authentication::Realm

Download:
Catalyst-Plugin-Authentication-0.10007_01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  4
Open  5
View/Report Bugs
Source   Latest Release: Catalyst-Plugin-Authentication-0.10023

NAME ^

Catalyst::Authentication::Realm - Base class for realm objects.

DESCRIPTION ^

CONFIGURATION ^

class

By default this class is used by Catalyst::Plugin::Authentication for all realms. The class parameter allows you to choose a different class to use for this realm. Creating a new Realm class can allow for authentication methods that fall outside the normal credential/store methodology.

auto_create_user

Set this to true if you wish this realm to auto-create user accounts when the user doesn't exist (most useful for remote authentication schemes).

auto_update_user

Set this to true if you wish this realm to auto-update user accounts after authentication (most useful for remote authentication schemes).

METHODS ^

new( $realmname, $config, $app )

Instantiantes this realm, plus the specified store and credential classes.

store( )

Returns an instance of the store object for this realm.

credential( )

Returns an instance of the credential object for this realm.

find_user( $authinfo, $c )

Retrieves the user given the authentication information provided. This is most often called from the credential. The default realm class simply delegates this call the store object. If enabled, auto-creation and auto-updating of users is also handled here.

authenticate( $c, $authinfo)

Performs the authentication process for the current realm. The default realm class simply delegates this to the credential and sets the authenticated user on success. Returns the authenticated user object;

save_user_in_session($c, $user)

Used to save the user in a session. Saves $user in the current session, marked as originating in the current realm. Calls $store->for_session() by default. If for_session is not available in the store class, will attempt to call $user->for_session().

persist_user($c, $user)

Takes the user data and persists it in the sessi.on

remove_persisted_user($c)

Removes any persisted user data in the session.

restore_user($c, [$frozen_user])

Restores the user from parameter, or the session by default.

user_is_restorable( $c )

Predicate to tell you if the current session has restorable user data.

from_session($c, $frozenuser )

Triggers restoring of the user from data in the session. The default realm class simply delegates the call to $store->from_session($c, $frozenuser);

syntax highlighting: