MiniCodeMonkey / amazon-alexa-php

Amazon Alexa PHP Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Certification Validation

TSGames opened this issue · comments

I've used this library to successfully publishing a skill in the store. For this, I've added full validation and modified response status to 400 on Exception. Furthermore, I've also reduced the timestamp validation time to 15 seconds, I'm not sure if it's required but with this modification amazon has acceppted the skill. Attached you find my modified Request.php, may you want to push it into the library., I'm too lazy to setup git ;)

Thanks for providing this library and Regards :)

Request.zip

Hey, you could simply click on "Fork this project and edit the file"! Than you could submit your changes and create a pull request without installing any git client ;)

Thanks, I've done so ;)

I forked it away, it says pull requests are not allowed here.

Great job! Thanks. Saved me a lot of time.

Only changes necessary for me:

55: $url=getallheaders()["Signaturecertchainurl"];
-> $url=getallheaders()["SignatureCertChainUrl"];

48: $valid&=$url["port"]==443 || $url["port"]==null;
-> $valid&=(!isset($url["port"])) || (isset($url["port"]) && ($url["port"]==443 || $url["port"]==null));

Added above
79: date_default_timezone_set('UTC');