The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catalyst::Authentication::Credential::Crowd - Authenticate a user using Crowd REST Service

SYNOPSIS

    use Catalyst qw/
        Authentication

    /;

    __PACKAGE__->config( authentication => {
        default_realm => 'crowd',
        realms => {
            crowd => {
                credential => {
                    class => 'Crowd',
                    authen_url => 'http://yourcrowdservice.url/authentication,
                    app => {
                        app_name => 'your_crowd_app_name',
                        password => 'password_for_app_name',
                    }
                },
                ...
            },
        }
    });

    # in controller

    sub login : Local {
        my ( $self, $c ) = @_;

        $c->authenticate( {
            username => $c->req->param('username'),
            password => $c->req->param('password')
        }

        # ... do something else ...
    }

METHODS

authenticate

Authenticate a user.

PRIVATE METHODS

_crowd_authen

Make a HTTP request to Crowd REST Service to authenticate a user.

SEE ALSO

https://github.com/keerati/Catalyst-Authentication-Credential-Crowd

AUTHOR

Keerati Thiwanruk, <keerati.th@gmail.com<gt>

COPYRIGHT AND LICENSE

Copyright (C) 2012 by Keerati Thiwanruk

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.