v2: Updates

* Simplifies & beautifies everything
* Introduces a new Class system.
* Errors are defaulted to AWS's handler.
* New function names & more efficient handling.
* Should fix a majority of the errors.

Please read the README for more!
This commit is contained in:
Devang Srivastava 2020-09-28 15:32:51 +05:30
commit e6d7753dc8
1095 changed files with 45088 additions and 2911 deletions

View file

@ -40,6 +40,11 @@ use Aws\Exception\UnresolvedSignatureException;
*/
class SignatureProvider
{
private static $s3v4SignedServices = [
's3' => true,
's3control' => true,
];
/**
* Resolves and signature provider and ensures a non-null return value.
*
@ -111,7 +116,7 @@ class SignatureProvider
switch ($version) {
case 's3v4':
case 'v4':
return $service === 's3'
return !empty(self::$s3v4SignedServices[$service])
? new S3SignatureV4($service, $region)
: new SignatureV4($service, $region);
case 'v4-unsigned-body':