All rejoice 1.0 of C::P::Auth::Simple is on the CPAN.
There is a remarkable similarity between this & the other two C::P::Auth
modules already on the CPAN, go figure.
From the README:
Catalyst-Plugin-Authentication-Simple version 1.0

A 'simple' authentication mechanism for Catalyst.
Usernames, passwords, & roles come from either a file or an array ref.

In your Catalyst main module say something like:

authentication => {
user_file => '/full/path/to/user/file',
[ password_hash => 'md5' OR 'sha' ]

The format of 'user_file' is:


Instead of 'user_file' you can pass in an array ref like:

authentication => {
users => [
[ password_hash => 'md5' OR 'sha' ]

IF 'password_hash' is set to md5 or sha the password is a hash of one of
those two variants, so the $password you pass into 'login' or
'session_login' will be hashed by Digest::MD5::md5_hex or
Digest::SHA::sha1_hex & then checked for equality.

Final thing - if you pass in a filename the username list will be read in
once & only once & then converted to the 'users' array ref. Later in your
app you can dynamically change this array ref. as you please for future
login attempts...

Have Fun!

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJul 27, '05 at 2:13a
activeJul 27, '05 at 2:13a

1 user in discussion

Mark Ethan Trostler: 1 post



site design / logo © 2021 Grokbase