Vonage / vonage-node-sdk

Vonage API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Apache License 2.0
375 stars 178 forks source link

feature(sms): Added incoming signature verification #861

Closed dragonmantank closed 10 months ago

dragonmantank commented 10 months ago

Description

Adds incoming signature verification to the SMS module. This adds a new verifySignature() method to the SMS module where the user can pass in the incoming signature, parameters to check, their signature secret, and the configured algorithm type.

Motivation and Context

Customer expectations dictated that we added this back into the SDKs. To avoid issues with JWT verification, this is added directly to the SMS API as it is the only one to use this verification technique.

Testing Details

Unit tests ported from the PHP testing suite.

Example Output or Screenshots (if appropriate)

Types of changes

Checklist