Skip to content

Commit

Permalink
Merge pull request #88 from maxbeckers/develop
Browse files Browse the repository at this point in the history
close #87
  • Loading branch information
maxbeckers authored Nov 26, 2021
2 parents ffc466c + 5def637 commit 2149bd0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## [1.9.0](/~https://github.com/maxbeckers/amazon-alexa-php/tree/1.10.0) (2021-11-26)
[Full Changelog](/~https://github.com/maxbeckers/amazon-alexa-php/compare/1.9.0...1.10.0)

## [1.9.0](/~https://github.com/maxbeckers/amazon-alexa-php/tree/1.9.0) (2020-08-28)
[Full Changelog](/~https://github.com/maxbeckers/amazon-alexa-php/compare/1.8.0...1.9.0)

Expand Down
7 changes: 7 additions & 0 deletions examples/ask-for-permissions-card-response.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
if ($requestBody) {
$alexaRequest = Request::fromAmazonRequest($requestBody, $_SERVER['HTTP_SIGNATURECERTCHAINURL'], $_SERVER['HTTP_SIGNATURE']);

if (!$alexaRequest) {
http_response_code(400);
exit();
}

// Request validation
$validator = new RequestValidator();
$validator->validate($alexaRequest);
Expand All @@ -39,6 +44,8 @@
// render response
header('Content-Type: application/json');
echo json_encode($response);
} else {
http_response_code(400);
}

exit();
7 changes: 7 additions & 0 deletions examples/card-response.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
if ($requestBody) {
$alexaRequest = Request::fromAmazonRequest($requestBody, $_SERVER['HTTP_SIGNATURECERTCHAINURL'], $_SERVER['HTTP_SIGNATURE']);

if (!$alexaRequest) {
http_response_code(400);
exit();
}

// Request validation
$validator = new RequestValidator();
$validator->validate($alexaRequest);
Expand All @@ -39,6 +44,8 @@
// render response
header('Content-Type: application/json');
echo json_encode($response);
} else {
http_response_code(400);
}

exit();
7 changes: 7 additions & 0 deletions examples/simple-intent-request.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
if ($requestBody) {
$alexaRequest = Request::fromAmazonRequest($requestBody, $_SERVER['HTTP_SIGNATURECERTCHAINURL'], $_SERVER['HTTP_SIGNATURE']);

if (!$alexaRequest) {
http_response_code(400);
exit();
}

// Request validation
$validator = new RequestValidator();
$validator->validate($alexaRequest);
Expand All @@ -39,6 +44,8 @@
// render response
header('Content-Type: application/json');
echo json_encode($response);
} else {
http_response_code(400);
}

exit();

0 comments on commit 2149bd0

Please sign in to comment.