Catalyst::Authentication::Credential::OAuth - OAuth credential for Catalyst::Plugin::Authentication framework.
0.02
In MyApp.pm
use Catalyst qw/ Authentication Session Session::Store::FastMmap Session::State::Cookie /;
In myapp.conf
<Plugin::Authentication> default_realm oauth <realms> <oauth> <credential> class OAuth <providers> <example.com> consumer_key my_app_key consumer_secret my_app_secret request_token_endpoint http://example.com/oauth/request_token access_token_endpoint http://example.com/oauth/access_token user_auth_endpoint http://example.com/oauth/authorize </example.com> </providers> </credential> </oauth> </realms> </Plugin::Authentication>
In controller code,
sub oauth : Local { my ($self, $c) = @_; if( $c->authenticate( { provider => 'example.com' } ) ) { #do something with $c->user } }
Cosmin Budrica <cosmin@sinapticode.com>
Bogdan Lucaciu <bogdan@sinapticode.com>
With contributions from:
Tomas Doran E<lt>bobtfish@bobtfish.netE</gt>
Only tested with twitter
Copyright (c) 2009 Sinapticode. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Authentication::Credential::OAuth, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Authentication::Credential::OAuth
CPAN shell
perl -MCPAN -e shell install Catalyst::Authentication::Credential::OAuth
For more information on module installation, please visit the detailed CPAN module installation guide.