NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class S3SignatureV4

Amazon S3 signature version 4 overrides.

  Aws\Common\Signature\AbstractSignature implements Aws\Common\Signature\SignatureInterface
  Aws\Common\Signature\SignatureV4 implements Aws\Common\Signature\EndpointSignatureInterface
  Aws\S3\S3SignatureV4 implements Aws\S3\S3SignatureInterface

Namespace: Aws\S3
Located at Aws/S3/S3SignatureV4.php

## Methods summary

- `public` `signRequest ( Guzzle\Http\Message\RequestInterface $request, Aws\Common\Credentials\CredentialsInterface $credentials )`

  Always add a x-amz-content-sha-256 for data integrity.

- `protected` `getPresignedPayload ( Guzzle\Http\Message\RequestInterface $request )`

  Override used to allow pre-signed URLs to be created for an in-determinate request payload.

- `protected` `createCanonicalizedPath ( Guzzle\Http\Message\RequestInterface $request )`

  Amazon S3 does not double-encode the path component in the canonical req

## Methods detail

# `public`
`signRequest( `Guzzle\Http\Message\RequestInterface` $request, `Aws\Common\Credentials\CredentialsInterface` $credentials )`

Always add a x-amz-content-sha-256 for data integrity.

#### Parameters

$request
  ``Guzzle\Http\Message\RequestInterface``
  $request Request to add a signature to
$credentials
  ``Aws\Common\Credentials\CredentialsInterface``
  $credentials Signing credentials

#### Overrides

`Aws\Common\Signature\SignatureV4::signRequest`

#### Implementation of

`Aws\Common\Signature\SignatureInterface::signRequest()`
# `protected string`
`getPresignedPayload( `Guzzle\Http\Message\RequestInterface` $request )`

Override used to allow pre-signed URLs to be created for an in-determinate request payload.

#### Parameters

$request
  ``Guzzle\Http\Message\RequestInterface``
  $request

#### Returns

`string`

#### Overrides

`Aws\Common\Signature\SignatureV4::getPresignedPayload`
# `protected`
`createCanonicalizedPath( `Guzzle\Http\Message\RequestInterface` $request )`

Amazon S3 does not double-encode the path component in the canonical req

#### Overrides

`Aws\Common\Signature\SignatureV4::createCanonicalizedPath`

### Methods inherited from Aws\Common\Signature\SignatureV4

`__construct()`, `convertPostToGet()`, `createPresignedUrl()`, `getPayload()`, `setMaxCacheSize()`, `setRegionName()`, `setServiceName()`

### Methods inherited from Aws\Common\Signature\AbstractSignature

`getTimestamp()`

### Magic methods summary

## Constants summary

### Constants inherited from Aws\Common\Signature\SignatureV4

`DEFAULT_PAYLOAD`

## Properties summary

### Properties inherited from Aws\Common\Signature\SignatureV4

`$cacheSize`, `$hashCache`, `$maxCacheSize`, `$regionName`, `$serviceName`