Skip to content

Commit

Permalink
Merge pull request #4 from FallDi/patch-3
Browse files Browse the repository at this point in the history
FIX the docs: access key cannot contains spaces
  • Loading branch information
boogie committed Jul 16, 2015
2 parents aadc7a0 + 7351ba4 commit a0eb440
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Let's say you want to send a signed POST request to http://example.com/ using th
$yourHeaders = array('Content-Type' => 'application/json');

$headersWithAuthInfo = Escher::create('example/credential/scope')
->signRequest('YOUR ACCESS KEY ID', 'YOUR SECRET', $method, $url, $requestBody, $yourHeaders);
->signRequest('YOUR_ACCESS_KEY_ID', 'YOUR SECRET', $method, $url, $requestBody, $yourHeaders);

$client = new GuzzleHttp\Client();
$response = $client->post($url, array(
Expand All @@ -36,7 +36,7 @@ In some cases you may want to send authenticated requests from a context where y
You can however generate a presigned URL, where the authentication information is added to the query string.

$presignedUrl = Escher::create('example/credential/scope')
->presignUrl('YOUR ACCESS KEY ID', 'YOUR SECRET', 'http://example.com');
->presignUrl('YOUR_ACCESS_KEY_ID', 'YOUR SECRET', 'http://example.com');


Validating a request
Expand All @@ -47,8 +47,8 @@ Escher accepts any kind of object as a key database that implements the ArrayAcc

try {
$keyDB = new ArrayObject(array(
'ACCESS KEY OF CLIENT 1' => 'SECRET OF CLIENT 1',
'ACCESS KEY OF CLIENT 42' => 'SECRET OF CLIENT 42',
'ACCESS_KEY_OF_CLIENT_1' => 'SECRET OF CLIENT 1',
'ACCESS_KEY_OF_CLIENT_42' => 'SECRET OF CLIENT 42',
));
Escher::create('example/credential/scope')->validateRequest($keyDB);
} catch (EscherException $ex) {
Expand Down

0 comments on commit a0eb440

Please sign in to comment.