View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jess Robinson > Catalyst-Plugin-Authentication-0.10007_01 > Catalyst::Authentication::Realm



Annotate this POD


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


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




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.


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


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


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


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: