APIClient/Authn/Token.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 90.9% 20 / 22 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« APIClient/Authn.pm ↑ Summary APIClient/Authn/Password.pm »
1 package cPanel::APIClient::Authn::Token;
2  
3 # Copyright 2020 cPanel, L. L. C.
4 # All rights reserved.
5 # http://cpanel.net
6 #
7 # This is free software; you can redistribute it and/or modify it under the
8 # same terms as Perl itself. See L<perlartistic>.
9  
10 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶use parent 'cPanel::APIClient::Authn';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 6 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
16 6 my ( $class, $username, $token ) = @_;
17  
18 6 return bless [ $username, $token ], $class;
19 }
20  
21 6 ▶sub get_http_headers_for_service {
Subroutine get_http_headers_for_service: called CC=1 SCAR=0.0
Pod undocumented
22 6 my ( $self, $service_obj ) = @_;
23  
24 6 my $hdr_svc = $service_obj->service_name(); # TODO: check for whostmgr
25  
26 6 return [ Authorization => "$hdr_svc $self->[0]:$self->[1]" ];
27 }
28  
29 2 1;
« APIClient/Authn.pm ↑ Summary APIClient/Authn/Password.pm »