line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package LWP::Authen::OAuth2::ServiceProvider::MediaWiki; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
61080
|
use base qw(LWP::Authen::OAuth2::ServiceProvider); |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
1562
|
|
4
|
3
|
|
|
3
|
|
69624
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
46
|
|
5
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
63
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
1094
|
use Error::Pure qw(err); |
|
3
|
|
|
|
|
30368
|
|
|
3
|
|
|
|
|
46
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub authorization_endpoint { |
12
|
0
|
|
|
0
|
1
|
0
|
err 'Need to be implemented. End point /oauth2/authorize.'; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub token_endpoint { |
16
|
1
|
|
|
1
|
1
|
340
|
err 'Need to be implemented. End point oauth2/access_token.'; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub authorization_required_params { |
20
|
1
|
|
|
1
|
0
|
15469
|
my $self = shift; |
21
|
1
|
|
|
|
|
5
|
return ('response_type', 'client_id'); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub authorization_optional_params { |
25
|
1
|
|
|
1
|
0
|
15
|
my $self = shift; |
26
|
1
|
|
|
|
|
5
|
return ('redirect_uri', 'scope', 'state', 'code_challenge', 'code_challenge_method'); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub authorization_default_params { |
30
|
1
|
|
|
1
|
0
|
65
|
my $self = shift; |
31
|
1
|
|
|
|
|
5
|
return ('response_type' => 'code'); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub request_required_params { |
35
|
1
|
|
|
1
|
0
|
15
|
my $self = shift; |
36
|
1
|
|
|
|
|
3
|
return ('grant_type'); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub request_optional_params { |
40
|
1
|
|
|
1
|
0
|
15
|
my $self = shift; |
41
|
1
|
|
|
|
|
5
|
return ('client_id', 'client_secret', 'redirect_uri', 'scope', 'code', |
42
|
|
|
|
|
|
|
'refresh_token', 'code_verifier'); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub request_default_params { |
46
|
1
|
|
|
1
|
0
|
14
|
my $self = shift; |
47
|
1
|
|
|
|
|
4
|
return ('grant_type' => 'authorization_code'); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub refresh_required_params { |
51
|
1
|
|
|
1
|
0
|
16
|
my $self = shift; |
52
|
1
|
|
|
|
|
4
|
return ('grant_type', 'refresh_token', 'client_id', 'client_secret'); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub refresh_default_params { |
56
|
1
|
|
|
1
|
0
|
15
|
my $self = shift; |
57
|
1
|
|
|
|
|
3
|
return ('grant_type' => 'refresh_token'); |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |