Group
Extension

WWW-JSON/lib/WWW/JSON/Role/Authentication/Header.pm

package WWW::JSON::Role::Authentication::Header;
use Moo::Role;
requires 'authentication';
requires 'ua';

sub _validate_Header {
    my ( $self, $auth ) = @_;
    die "Required header string missing for " . __PACKAGE__ . " authentication"
      unless defined($auth);
}

sub _auth_Header {
    my ( $self, $auth, $req ) = @_;
    $req->header( Authorization => $auth );
}

1;


Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.