| 1 | ########################################### | ||
| 2 | package OAuth::Cmdline::Spotify; | ||
| 3 | ########################################### | ||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use MIME::Base64; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | ▶ | use base qw( OAuth::Cmdline ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | ########################################### | ||
| 11 | sub site { | ||
| 12 | ########################################### | ||
| 13 | 0 | ▶ | return "spotify"; |
|
Subroutine
site: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 14 | } | ||
| 15 | |||
| 16 | ########################################### | ||
| 17 | sub token_refresh_authorization_header { | ||
| 18 | ########################################### | ||
| 19 | 0 | ▶ | my( $self ) = @_; |
|
Subroutine
token_refresh_authorization_header: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 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 | 1; | |
| 33 | |||
| 34 | __END__ | ||
| 35 | |||
| 36 | =head1 NAME | ||
| 37 | |||
| 38 | OAuth::Cmdline::Spotify - Spotify-specific OAuth oddities | ||
| 39 | |||
| 40 | =head1 SYNOPSIS | ||
| 41 | |||
| 42 | # don't use this directly | ||
| 43 | |||
| 44 | =head1 DESCRIPTION | ||
| 45 | |||
| 46 | This class overrides methods of C<OAuth::Cmdline> if Spotify's Web API | ||
| 47 | deviates from standard OAuth. | ||
| 48 | |||
| 49 | =head1 LEGALESE | ||
| 50 | |||
| 51 | Copyright 2014 by Mike Schilli, all rights reserved. | ||
| 52 | This program is free software, you can redistribute it and/or | ||
| 53 | modify it under the same terms as Perl itself. | ||
| 54 | |||
| 55 | =head1 AUTHOR | ||
| 56 | |||
| 57 | 2014, Mike Schilli <cpan@perlmeister.com> | ||