Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

catalyst::authentication::realm(3pm) [debian man page]

Catalyst::Authentication::Realm(3pm)			User Contributed Perl Documentation		      Catalyst::Authentication::Realm(3pm)

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). use_session Sets session usage for this particular realm - overriding the global use_sesion setting. 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; USER PERSISTENCE
The Realm class allows complete control over the persistance of users between requests. By default the realm attempts to use the Catalyst session system to accomplish this. By overriding the methods below in a custom Realm class, however, you can handle user persistance in any way you see fit. persist_user($c, $user) persist_user is the entry point for saving user information between requests in most cases this will utilize the session. By default this uses the catalyst session system to store the user by calling for_session on the active store. The user object must be a subclass of Catalyst::Authentication::User. If you have updated the user object, you must call persist_user again to ensure that the persisted user object reflects your updates. remove_persisted_user($c) Removes any persisted user data. By default, removes the user from the session. user_is_restorable( $c ) Returns whether there is a persisted user that may be restored. Returns a token used to restore the user. With the default session persistance it returns the raw frozen user information. restore_user($c, [$frozen_user]) Restores the user from the given frozen_user parameter, or if not provided, using the response from $self->user_is_restorable(); Uses $self->from_session() to decode the frozen user. failed_user_restore($c) If there is a session to restore, but the restore fails for any reason then this method is called. This method supplied just removes the persisted user, but can be overridden if required to have more complex logic (e.g. finding a the user by their 'old' username). from_session($c, $frozenuser ) Decodes the frozenuser information provided and returns an instantiated user object. By default, this call is delegated to $store->from_session(). save_user_in_session($c, $user) DEPRECATED. Use persist_user instead. (this simply calls persist_user) perl v5.14.2 2012-04-14 Catalyst::Authentication::Realm(3pm)

Check Out this Related Man Page

Catalyst::Authentication::Store::DBIx::Class::User(3pm) User Contributed Perl DocumentationCatalyst::Authentication::Store::DBIx::Class::User(3pm)

NAME
Catalyst::Authentication::Store::DBIx::Class::User - The backing user class for the Catalyst::Authentication::Store::DBIx::Class storage module. VERSION
This documentation refers to version 0.1503. SYNOPSIS
Internal - not used directly, please see Catalyst::Authentication::Store::DBIx::Class for details on how to use this module. If you need more information than is present there, read the source. DESCRIPTION
The Catalyst::Authentication::Store::DBIx::Class::User class implements user storage connected to an underlying DBIx::Class schema object. SUBROUTINES
/ METHODS new Constructor. load ( $authinfo, $c ) Retrieves a user from storage using the information provided in $authinfo. supported_features Indicates the features supported by this class. These are currently Roles and Session. roles Returns an array of roles associated with this user, if roles are configured for this user class. for_session Returns a serialized user for storage in the session. from_session Revives a serialized user from storage in the session. get ( $fieldname ) Returns the value of $fieldname for the user in question. Roughly translates to a call to the DBIx::Class::Row's get_column( $fieldname ) routine. get_object Retrieves the DBIx::Class object that corresponds to this user obj (method) Synonym for get_object auto_create This is called when the auto_create_user option is turned on in Catalyst::Plugin::Authentication and a user matching the authinfo provided is not found. By default, this will call the "auto_create()" method of the resultset associated with this object. It is up to you to implement that method. auto_update This is called when the auto_update_user option is turned on in Catalyst::Plugin::Authentication. Note that by default the DBIx::Class store uses every field in the authinfo hash to match the user. This means any information you provide with the intent to update must be ignored during the user search process. Otherwise the information will most likely cause the user record to not be found. To ignore fields in the search process, you have to add the fields you wish to update to the 'ignore_fields_in_find' authinfo element. Alternately, you can use one of the advanced row retrieval methods (searchargs or resultset). By default, auto_update will call the "auto_update()" method of the DBIx::Class::Row object associated with the user. It is up to you to implement that method (probably in your schema file) AUTOLOAD Delegates method calls to the underlieing user row. can Delegates handling of the "can" method to the underlieing user row. BUGS AND LIMITATIONS
None known currently, please email the author if you find any. AUTHOR
Jason Kuri (jayk@cpan.org) CONTRIBUTORS
Matt S Trout (mst) <mst@shadowcat.co.uk> (fixes wrt can/AUTOLOAD sponsored by <http://reask.com/>) LICENSE
Copyright (c) 2007-2010 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. perl v5.14.2 2011-12-08 Catalyst::Authentication::Store::DBIx::Class::User(3pm)
Man Page