Download the PHP package mfn/aws-post-v4-sign without Composer
On this page you can find all versions of the php package mfn/aws-post-v4-sign. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package aws-post-v4-sign
THIS REPO IS ARCHIVED
Please use the features of the official AWS SDK PHP https://github.com/aws/aws-sdk-php
Specifically, have a look at https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-presigned-post.html
Create V4 signature for AWS S3 REST API Post requests
Homepage: https://github.com/mfn/php-aws-post-v4-sign
Blurb
This library can create signature for a POST request designated for Amazon Simple Storage (S3) REST API service.
This package does not depend on the AWS PHP SDK. It can only create a signature. Logically, this code exists in similar form inside the SDK, but it's not possible form the outside to leaverage it.
Fore more information see:
- http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html
- http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-UsingHTTPPOST.html
Requirements
PHP 5.4
Install / Setup
Using composer: composer.phar require mfn/aws-post-v4-sign 0.1
Example
The SignatureV4
class will parse the $policy
to that extent to extract
the x-awz-credential
key, as this credential is an essential part for
creating the signature.
As a base64 encoded JSON representation of the $policy
is required to
create the signature and is usually required for the final request,
a method for retrieving it exists:
$encodedPolicy = $sigGen->getBase64EncodedPolicy();
Contribute
Fork it, hack on a feature branch, create a pull request, be awesome!
No developer is an island so adhere to these standards:
© Markus Fischer [email protected]