File Coverage

blib/lib/OAuth/Cmdline/Spotify.pm
Criterion Covered Total %
statement 12 17 70.5
branch n/a
condition n/a
subroutine 4 6 66.6
pod 0 2 0.0
total 16 25 64.0


line stmt bran cond sub pod time code
1             ###########################################
2             package OAuth::Cmdline::Spotify;
3             ###########################################
4 1     1   22158 use strict;
  1         1  
  1         22  
5 1     1   3 use warnings;
  1         1  
  1         20  
6 1     1   356 use MIME::Base64;
  1         444  
  1         74  
7              
8 1     1   4 use base qw( OAuth::Cmdline );
  1         1  
  1         316  
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__