« blib/lib/WWW/JSON/Role/Authentication/Basic.pm
↑ Summary
blib/lib/WWW/JSON/Role/Authentication/OAuth2.pm »
| 1 | package WWW::JSON::Role::Authentication::Header; | ||||||||||
| 2 | 8 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 8 | requires 'authentication'; | |||||||||
| 4 | 8 | requires 'ua'; | |||||||||
| 5 | |||||||||||
| 6 | sub _validate_Header { | ||||||||||
| 7 | 0 | ▶ | my ( $self, $auth ) = @_; | ||||||||
|
Subroutine
_validate_Header: not called CC=2 SCAR=17.9
| |||||||||||
| 8 | 0 | ▶ | die "Required header string missing for " . __PACKAGE__ . " authentication" | ||||||||
|
Branch: 1 branch
| |||||||||||
| 9 | unless defined($auth); | ||||||||||
| 10 | } | ||||||||||
| 11 | |||||||||||
| 12 | sub _auth_Header { | ||||||||||
| 13 | 0 | ▶ | my ( $self, $auth, $req ) = @_; | ||||||||
|
Subroutine
_auth_Header: not called CC=1 SCAR=6.9
| |||||||||||
| 14 | 0 | $req->header( Authorization => $auth ); | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | 8 | 1; | |||||||||