Alastair Douglas > Catalyst-Authentication-Store-MongoDB-1e > Catalyst::Authentication::Store::MongoDB

Download:
Catalyst-Authentication-Store-MongoDB-1e-4.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1e-4   Source  

NAME ^

Catalyst::Authentication::Store::MongoDB - MongoDB backend for Catalyst::Plugin::Authentication

VERSION ^

Version 0.01

SYNOPSIS ^

This module links a subclass of MongoDB to your Catalyst application as a user store for the Authentication plugin.

    <Plugin::Authentication>
        <default>
            <credential>
                class Password
                password_type self_check
            </credential>
            <store>
                class MongoDB
                user_collection user
                user_class Catalyst::Authentication::User::Hash
                model MongoDB
                database db
            </store>
        </default>
    </Plugin::Authentication>

Then use it as normal

    sub login : Local {
        my ($self, $c) = @_;
        $c->authenticate({
            username => $username,
            password => $password
        });
    }

CONFIGURATION ^

class

The configuration required by Catalyst::Plugin::Authentication to load this store in the first place.

user_collection

The collection in your database that holds users.

user_class

Some subclass of Catalyst::Authentication::User to bless the returned objects as.

model

The model name that you'd give to $c->model. It is expected that your model is a MongoDB subclass.

database

The database that your user_collection is a collection in.

AUTHOR ^

Altreus, <altreus at cpan.org>

BUGS ^

I'll be amazed if this works for you at all.

Bugs and requests to github please - https://github.com/Altreus/Catalyst-Authentication-Store-MongoDB/issues

SUPPORT ^

You are reading all the support you're likely to get.

ACKNOWLEDGEMENTS ^

Thanks to BOBTFISH for wracking his brains to try to remember how this stuff works.

LICENSE AND COPYRIGHT ^

Copyright 2012 Altreus.

MIT licence. Go nuts.

syntax highlighting: