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