line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package LWP::Authen::OAuth2::ServiceProvider::Strava; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Access Strava using OAuth2 |
4
|
|
|
|
|
|
|
our $VERSION = '0.19'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
721
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
7
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
149
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(LWP::Authen::OAuth2::ServiceProvider); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub authorization_endpoint { |
12
|
1
|
|
|
1
|
1
|
11
|
return "https://www.strava.com/oauth/authorize"; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub token_endpoint { |
16
|
1
|
|
|
1
|
1
|
6
|
return "https://www.strava.com/oauth/token"; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub authorization_required_params { |
20
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
21
|
1
|
|
|
|
|
6
|
return ("client_id", "redirect_uri", "response_type", $self->SUPER::authorization_required_params()); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub authorization_optional_params { |
25
|
1
|
|
|
1
|
0
|
1
|
my $self = shift; |
26
|
1
|
|
|
|
|
4
|
return ("approval_prompt", "scope", "state", $self->SUPER::authorization_optional_params()); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub request_default_params { |
30
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
31
|
|
|
|
|
|
|
return ( |
32
|
1
|
|
|
|
|
4
|
"scope" => "public", |
33
|
|
|
|
|
|
|
"response_type" => "code", |
34
|
|
|
|
|
|
|
$self->SUPER::request_default_params() |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |