forked from startsiden/catalystx-oauth2-provider
/
README
76 lines (64 loc) · 1.96 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
NAME
CatalystX::OAuth2::Provider -
VERSION
Version 0.0005
SYNOPSIS
package MyApp;
use Moose;
use namespace::autoclean;
use Catalyst qw/
+CatalystX::OAuth2::Provider
Authentication
Session
Session::Store::File
Session::State::Cookie
Session::State::URI
Session::State::Auth
/;
extends 'Catalyst';
__PACKAGE__->config(
'Plugin::Authentication' => { # Auth config here }
);
__PACKAGE__->config(
'Plugin::Session' => { param => 'code', rewrite_body => 0 }, #Handle authorization code
);
__PACKAGE__->config(
'Controller::OAuth' => {
login_form => {
template => 'user/login.tt',
field_names => {
username => 'mail',
password => 'userPassword'
}
},
authorize_form => {
template => 'oauth/authorize.tt',
},
auth_info => {
client_1 => {
client_id => q{THIS_IS_ID},
client_secret => q{THIS_IS_SECRET},
redirect_uri => q{CLIENT_REDIRECT_URI},
},
},
protected_resource => {
secret_key => 'secret',
}
}
);
DESCRIPTION
CatalystX::OAuth2::Provider is an application class provides a OAuth2
Provider in only your Catalyst application configuration.
REQUIREMENTS
A Catalyst application
A working Authentication configuration
A working Session configuration
A View
METHODS
BUGS
AUTHOR
zdk (Warachet Samtalee)
COPYRIGHT & LICENSE
Copyright 2011 the above author(s).
This sofware is free software, and is licensed under the same terms as
perl itself.