line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
12310
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
2
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
53
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Mojolicious::Plugin::Web::Auth::Site::Runkeeper; |
5
|
|
|
|
|
|
|
$Mojolicious::Plugin::Web::Auth::Site::Runkeeper::VERSION = '0.000001'; |
6
|
1
|
|
|
1
|
|
374
|
use Mojo::Base qw/Mojolicious::Plugin::Web::Auth::OAuth2/; |
|
1
|
|
|
|
|
6430
|
|
|
1
|
|
|
|
|
4
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has access_token_url => 'https://runkeeper.com/apps/token'; |
9
|
|
|
|
|
|
|
has authorize_url => 'https://runkeeper.com/apps/authorize'; |
10
|
|
|
|
|
|
|
has response_type => 'code'; |
11
|
|
|
|
|
|
|
has user_info => 1; |
12
|
|
|
|
|
|
|
has user_info_url => 'https://api.runkeeper.com/user'; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
0
|
0
|
|
sub moniker { 'runkeeper' } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=pod |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=encoding UTF-8 |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Mojolicious::Plugin::Web::Auth::Site::Runkeeper - Runkeeper OAuth Plugin for Mojolicious::Plugin::Web::Auth |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 VERSION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
version 0.000001 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SYNOPSIS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Mojolicious |
33
|
|
|
|
|
|
|
$self->plugin('Web::Auth', |
34
|
|
|
|
|
|
|
module => 'Runkeeper', |
35
|
|
|
|
|
|
|
key => 'Runkeeper consumer key', |
36
|
|
|
|
|
|
|
secret => 'Runkeeper consumer secret', |
37
|
|
|
|
|
|
|
on_finished => sub { |
38
|
|
|
|
|
|
|
my ( $c, $access_token, $access_secret ) = @_; |
39
|
|
|
|
|
|
|
... |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# Mojolicious::Lite |
44
|
|
|
|
|
|
|
plugin 'Web::Auth', |
45
|
|
|
|
|
|
|
module => 'Runkeeper', |
46
|
|
|
|
|
|
|
key => 'Runkeeper consumer key', |
47
|
|
|
|
|
|
|
secret => 'Runkeeper consumer secret', |
48
|
|
|
|
|
|
|
on_finished => sub { |
49
|
|
|
|
|
|
|
my ( $c, $access_token, $access_secret ) = @_; |
50
|
|
|
|
|
|
|
... |
51
|
|
|
|
|
|
|
}; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# default authentication endpoint: /auth/runkeeper/authenticate |
55
|
|
|
|
|
|
|
# default callback endpoint: /auth/runkeeper/callback |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This module adds L support to |
60
|
|
|
|
|
|
|
L. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 AUTHOR |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Olaf Alders |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Olaf Alders. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
71
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
__END__ |