amazon-alexa-php icon indicating copy to clipboard operation
amazon-alexa-php copied to clipboard

Add Certification Validation

Open TSGames opened this issue 8 years ago • 5 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

TSGames avatar Mar 03 '17 16:03 TSGames

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 ;)

pattyland avatar Mar 30 '17 21:03 pattyland

Thanks, I've done so ;)

TSGames avatar May 08 '17 10:05 TSGames

I don't see it right now: https://github.com/MiniCodeMonkey/amazon-alexa-php/pulls

pattyland avatar May 08 '17 10:05 pattyland

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

TSGames avatar May 08 '17 13:05 TSGames

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');

Philipowitsch avatar May 29 '17 15:05 Philipowitsch