line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package LWP::Authen::OAuth2::ServiceProvider::Yahoo; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Access Yahoo using OAuth2 |
4
|
|
|
|
|
|
|
our $VERSION = '0.18'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @ISA = qw(LWP::Authen::OAuth2::ServiceProvider); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub authorization_endpoint { |
9
|
1
|
|
|
1
|
1
|
3
|
return "https://api.login.yahoo.com/oauth2/request_auth"; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub token_endpoint { |
13
|
1
|
|
|
1
|
1
|
5
|
return "https://api.login.yahoo.com/oauth2/get_token"; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub authorization_required_params { |
17
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
18
|
1
|
|
|
|
|
6
|
return ("client_id", "redirect_uri", "response_type", $self->SUPER::authorization_required_params()); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub authorization_optional_params { |
22
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
23
|
1
|
|
|
|
|
4
|
return ("state", "language", $self->SUPER::authorization_optional_params()); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub refresh_required_params { |
27
|
1
|
|
|
1
|
0
|
8
|
my $self = shift; |
28
|
1
|
|
|
|
|
5
|
return ("client_id", "client_secret", "redirect_uri", "grant_type", $self->SUPER::refresh_required_params()); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub request_required_params { |
32
|
1
|
|
|
1
|
0
|
1
|
my $self = shift; |
33
|
1
|
|
|
|
|
10
|
return ("client_id", "client_secret", "redirect_uri", "grant_type", $self->SUPER::request_required_params()); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub authorization_default_params { |
37
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
38
|
1
|
|
|
|
|
4
|
return ("response_type" => "code", $self->SUPER::authorization_default_params()); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub request_default_params { |
42
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
43
|
1
|
|
|
|
|
4
|
return ("grant_type" => "authorization_code", $self->SUPER::request_default_params()); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub refresh_default_params { |
47
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
48
|
1
|
|
|
|
|
10
|
return ("grant_type" => "refresh_token", $self->SUPER::refresh_default_params()); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |