1Catalyst::AuthenticatioUns:e:rReCaolnmt(r3i)buted Perl DCoactuamleynstta:t:iAounthentication::Realm(3)
2
3
4

NAME

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

DESCRIPTION

CONFIGURATION

10       class
11           By default this class is used by Catalyst::Plugin::Authentication
12           for all realms. The class parameter allows you to choose a
13           different class to use for this realm. Creating a new Realm class
14           can allow for authentication methods that fall outside the normal
15           credential/store methodology.
16
17       auto_create_user
18           Set this to true if you wish this realm to auto-create user
19           accounts when the user doesn't exist (most useful for remote
20           authentication schemes).
21
22       auto_update_user
23           Set this to true if you wish this realm to auto-update user
24           accounts after authentication (most useful for remote
25           authentication schemes).
26
27       use_session
28           Sets session usage for this particular realm - overriding the
29           global use_sesion setting.
30

METHODS

32   new( $realmname, $config, $app )
33       Instantiantes this realm, plus the specified store and credential
34       classes.
35
36   store( )
37       Returns an instance of the store object for this realm.
38
39   credential( )
40       Returns an instance of the credential object for this realm.
41
42   find_user( $authinfo, $c )
43       Retrieves the user given the authentication information provided.  This
44       is most often called from the credential.  The default realm class
45       simply delegates this call the store object.  If enabled, auto-creation
46       and auto-updating of users is also handled here.
47
48   authenticate( $c, $authinfo)
49       Performs the authentication process for the current realm.  The default
50       realm class simply delegates this to the credential and sets the
51       authenticated user on success.  Returns the authenticated user object;
52

USER PERSISTENCE

54       The Realm class allows complete control over the persistance of users
55       between requests.  By default the realm attempts to use the Catalyst
56       session system to accomplish this.  By overriding the methods below in
57       a custom Realm class, however, you can handle user persistance in any
58       way you see fit.
59
60   persist_user($c, $user)
61       persist_user is the entry point for saving user information between
62       requests in most cases this will utilize the session.  By default this
63       uses the catalyst session system to store the user by calling
64       for_session on the active store.  The user object must be a subclass of
65       Catalyst::Authentication::User.  If you have updated the user object,
66       you must call persist_user again to ensure that the persisted user
67       object reflects your updates.
68
69   remove_persisted_user($c)
70       Removes any persisted user data.  By default, removes the user from the
71       session.
72
73   user_is_restorable( $c )
74       Returns whether there is a persisted user that may be restored.
75       Returns a token used to restore the user.  With the default session
76       persistance it returns the raw frozen user information.
77
78   restore_user($c, [$frozen_user])
79       Restores the user from the given frozen_user parameter, or if not
80       provided, using the response from $self->user_is_restorable();  Uses
81       $self->from_session() to decode the frozen user.
82
83   failed_user_restore($c)
84       If there is a session to restore, but the restore fails for any reason
85       then this method is called. This method supplied just removes the
86       persisted user, but can be overridden if required to have more complex
87       logic (e.g. finding a the user by their 'old' username).
88
89   from_session($c, $frozenuser )
90       Decodes the frozenuser information provided and returns an instantiated
91       user object.  By default, this call is delegated to
92       $store->from_session().
93
94   save_user_in_session($c, $user)
95       DEPRECATED.  Use persist_user instead.  (this simply calls
96       persist_user)
97
98
99
100perl v5.38.0                      2023-07-20Catalyst::Authentication::Realm(3)
Impressum