alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 736 forks source link

feat: Add special timestamp verification for skill event requests #651

Closed ShenChen93 closed 3 years ago

ShenChen93 commented 3 years ago

Description

Decouples the verification tolerances for standard skill requests and skill event requests which have different maximums.

Motivation and Context

Due to the delivery characteristics of skill event requests, these requests may arrive with a timestamp value of up to 1 hour prior to the current time and are verified against a different upper bound value than standard requests.

Standard requests should be verified within 150 seconds. This change splits the verification logic of the two request classes.

https://developer.amazon.com/en-US/docs/alexa/smapi/skill-events-in-alexa-skills.html#delivery-of-events-to-the-skill

Testing

Added corresponding unit tests, and all existing unit tests pass

Screenshots (if appropriate)

Types of changes

Checklist

License