Cataly...inimal(3pm)

πŸ’– NAME πŸ’–

okay so the manual name is Cataly...inimal(3pm) β€” say it three times fast, I dare you β€” and the module is Catalyst::Authentication::Store::Minimal, aka a minimal authentication store. That's literally the whole NAME section, bestie. ✨


🌸 SYNOPSIS 🌸

Here's the synopsis, copied with love and exact characters because we do not mess with code in this house:

# you probably just want Store::Minimal under most cases,
# but if you insist you can instantiate your own store:

use Catalyst::Authentication::Store::Minimal;

use Catalyst qw/
    Authentication
/;

__PACKAGE__->config( 'Plugin::Authentication' =>
                {
                    default_realm => 'members',
                    realms => {
                        members => {
                            credential => {
                                class => 'Password',
                                password_field => 'password',
                                password_type => 'clear'
                            },
                            store => {
                                class => 'Minimal',
                                users => {
                                    bob => {
                                        password => "s00p3r",
                                        editor => 'yes',
                                        roles => [qw/edit delete/],
                                    },
                                    william => {
                                        password => "s3cr3t",
                                        roles => [qw/comment/],
                                    }
                                }
                            }
                        }
                    }
                }
);

πŸ¦‹ DESCRIPTION πŸ¦‹

This authentication store lets you make a very quick and dirty user database right inside your application's config hash. It's giving prototype main character energy, and honestly that's the point. πŸ’…

You will need to include the Authentication plugin, and at least one Credential plugin, to use this Store. Credential::Password is reccommended β€” yes, that's their spelling in the source, iconic β€” so go ahead and use that.

Its purpose is mainly for testing, and it should probably be replaced by a more "serious" store for production.

bestie, fr fr: this is the test-config store, not the production fortress. keep that vibe check in mind. 🫢

The hash in the config, as well as the user objects/hashes, are freely mutable at runtime. No cap.


πŸŽ€ CONFIGURATION πŸŽ€

Three config knobs, let's go.

class

The classname used for the store. This is part of Catalyst::Plugin::Authentication and is the method by which Catalyst::Authentication::Store::Minimal is loaded as the user store. For this module to be used, this must be set to 'Minimal'. Periodt. πŸ’–

user_class

The class used for the user object. If you don't specify a class name, the default Catalyst::Authentication::User::Hash will be used. If you define your own class, it must inherit from Catalyst::Authentication::User::Hash. That's the rule, bestie.

users

This is a simple hash of users: the keys are the usenames (their typo, not mine, we stan), and the values are hashrefs containing a password key/value pair, and optionally, a roles/list of role-names pair. If using roles, you will also need to add the Authorization::Roles plugin.

See the SYNOPSIS for an example. It's right up there, slaying. ✨


🌈 METHODS 🌈

There are no publicly exported routines in the Minimal store (or indeed in most authentication stores). However, below is a description of the routines required by Catalyst::Plugin::Authentication for all authentication stores. Buckle up, it's a short ride. 🎒

new( $config, $app, $realm )

Constructs a new store object, which uses the user element of the supplied config hash ref as its backing structure. The source says it's instead of its β€” we love a grammar moment β€” but the meaning is exactly that.

find_user( $authinfo, $c )

Keys the hash by the 'id' or 'username' element in the authinfo hash and returns the user.

Then the source literally says:

... documentation fairy stopped here. ...

If the return value is unblessed it will be blessed as Catalyst::Authentication::User::Hash. Cute. 🧚

from_session( $id )

Delegates to get_user. That's the whole assignment, bestie.

user_supports( )

Chooses a random user from the hash and delegates to it. Random user selection? It's giving chaos, but make it authentication. πŸ’€

get_user( )

Deprecated. That's the whole note. No extra lore. πŸ™ˆ

setup( )

The source has no description for this one β€” just the name and main character energy. πŸ‘‘


okay bestie, that's the whole page. Footer tea: perl v5.40.1, dated 2026-05-22, from the User Contributed Perl Documentation pile, manual name Cataly...inimal(3pm). slay, hydrate, and go configure something cute πŸ’–βœ¨

πŸ“¦ where this page comes from