line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
########################################### |
2
|
|
|
|
|
|
|
package OAuth::Cmdline::Spotify; |
3
|
|
|
|
|
|
|
########################################### |
4
|
1
|
|
|
1
|
|
43688
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
5
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
6
|
1
|
|
|
1
|
|
836
|
use MIME::Base64; |
|
1
|
|
|
|
|
905
|
|
|
1
|
|
|
|
|
101
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
9
|
use base qw( OAuth::Cmdline ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
610
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
########################################### |
11
|
|
|
|
|
|
|
sub site { |
12
|
|
|
|
|
|
|
########################################### |
13
|
0
|
|
|
0
|
0
|
|
return "spotify"; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
########################################### |
17
|
|
|
|
|
|
|
sub token_refresh_authorization_header { |
18
|
|
|
|
|
|
|
########################################### |
19
|
0
|
|
|
0
|
0
|
|
my( $self ) = @_; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $cache = $self->cache_read(); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
my $auth_header = |
24
|
|
|
|
|
|
|
"Basic " . |
25
|
|
|
|
|
|
|
encode_base64( |
26
|
|
|
|
|
|
|
"$cache->{ client_id }:$cache->{ client_secret }", |
27
|
|
|
|
|
|
|
"" # no line break!! |
28
|
|
|
|
|
|
|
); |
29
|
0
|
|
|
|
|
|
return ( "Authorization" => $auth_header ); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |