More stuff in .gitignore
[catagits/Catalyst-Authentication-Credential-OAuth.git] / README
CommitLineData
d5ad14fc 1NAME
2 Catalyst::Authentication::Credential::OAuth - OAuth credential for
3 Catalyst::Plugin::Authentication framework.
4
5VERSION
6 0.02
7
8SYNOPSIS
9 In MyApp.pm
10
11 use Catalyst qw/
12 Authentication
13 Session
14 Session::Store::FastMmap
15 Session::State::Cookie
16 /;
17
18 In myapp.conf
19
20 <Plugin::Authentication>
21 default_realm oauth
22 <realms>
23 <oauth>
24 <credential>
25 class OAuth
26 <providers>
27 <example.com>
28 consumer_key my_app_key
29 consumer_secret my_app_secret
30 request_token_endpoint http://example.com/oauth/request_token
31 access_token_endpoint http://example.com/oauth/access_token
32 user_auth_endpoint http://example.com/oauth/authorize
33 </example.com>
34 </providers>
35 </credential>
36 </oauth>
37 </realms>
38 </Plugin::Authentication>
39
40 In controller code,
41
42 sub oauth : Local {
43 my ($self, $c) = @_;
44
45 if( $c->authenticate( { provider => 'example.com' } ) ) {
46 #do something with $c->user
47 }
48 }
49
50USER METHODS
51 $c->user->token
52 $c->user->token_secret
53 $c->user->extra_params - whatever other params the provider sends back
54
55AUTHOR
56 Cosmin Budrica <cosmin@sinapticode.com>
57
58 Bogdan Lucaciu <bogdan@sinapticode.com>
59
60 With contributions from:
61
62 Tomas Doran E<lt>bobtfish@bobtfish.netE</gt>
63
64BUGS
65 Only tested with twitter
66
67COPYRIGHT
68 Copyright (c) 2009 Sinapticode. All rights reserved
69
70 This program is free software; you can redistribute it and/or modify it
71 under the same terms as Perl itself.
72