Skip to content
HTTP Signature perl6 implementation
Other
  1. Other 100.0%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/HTTP
t
.travis.yml
META6.json
README.md

README.md

Perl6-HTTP-Signature

Build Status

SYNOPSIS

ALPHA Implementation of http signature as defined in IETFF draft version 3

Heavily inspired from Authen::HTTP::Signature on perl5

To sign a request:

use HTTP::Signature;
use HTTP::UserAgent;
use HTTP::Request;

my $req = HTTP::Request.new(
    :GET('http://www.example.com/path')
);

my $signer = HTTP::Signature.new(
    keyid       => 'Test',
    secret      => 'MySuperSecretKey',
    algorithm   => 'hmac-sha256',
);
my $signed-request = $signer->sign-request( $req );
my $ua = HTTP::UserAgent.new;
my $response = $ua.request( $signed-request );

To verify a request:

use HTTP::Signature;

my $signer = HTTP::Signature.new(
    secret      => 'MySuperSecretKey',
);
if $signer.verify-request( $req ) {
    ...
}

DESCRIPTION

You can’t perform that action at this time.