File Coverage

lib/LWP/Authen/OAuth2/ServiceProvider/Strava.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 2 5 40.0
total 23 26 88.4


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.18'; # VERSION
5              
6 1     1   682 use strict;
  1         2  
  1         24  
7 1     1   5 use warnings;
  1         1  
  1         134  
8              
9             our @ISA = qw(LWP::Authen::OAuth2::ServiceProvider);
10              
11             sub authorization_endpoint {
12 1     1 1 3 return "https://www.strava.com/oauth/authorize";
13             }
14              
15             sub token_endpoint {
16 1     1 1 5 return "https://www.strava.com/oauth/token";
17             }
18              
19             sub authorization_required_params {
20 1     1 0 2 my $self = shift;
21 1         5 return ("client_id", "redirect_uri", "response_type", $self->SUPER::authorization_required_params());
22             }
23              
24             sub authorization_optional_params {
25 1     1 0 2 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__