Closed bbickerton closed 12 years ago
Can you add a unit test also?
Added a unit test with cases for valid parameters (action, email, sig), no parameters, individual missing parameters, action that's not equal to 'output', and wrong signature. Found that originally it didn't originally handle an undefined parameter object correctly, so that got fixed. Let me know if you need anything else.
Thanks.
Great. Any timeframe on when this is going to make it into the npm registry?
No timeframe for now.
I will probably wait until there are few other changes / features.
We're using this in production, so it'd be nice to have it sooner rather than later. Is there anything I can do to help speed it up?
Accepts an object of parameters. Ensures that 'action', 'email', and 'sig' parameters are defined and that 'action' is defined as 'optout'. Verifies that 'sig' matches the signature hash generated from the other parameters and the api secret.