node-slack-events-api icon indicating copy to clipboard operation
node-slack-events-api copied to clipboard

Export helper methods such as `verifyRequestSignature`

Open ianwsperber opened this issue 8 years ago • 2 comments

Description

Hey all! First of all congrats on the 2.0.0 release! I'm excited to use this library to build a slack integration, but have found that I want more flexibility in my request handler than provided through the provided adapter abstraction and its express middleware. It would be nice if users had access to some of the helper methods used by the adapter. Specifically I'd like to be able to import the verifyRequestSignature method, so that I do not need to handroll that somewhat complicated bit of logic. I'm happy to create a PR for this change if you think it'd be of value. Unsure if there might be other methods worth exporting as well. Thanks!

What type of issue is this? (place an x in one of the [ ])

  • [ ] bug
  • [X] enhancement (feature request)
  • [ ] question
  • [ ] documentation related
  • [ ] testing related
  • [ ] discussion

Requirements (place an x in each of the [ ])

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

ianwsperber avatar Aug 08 '18 21:08 ianwsperber

found that I want more flexibility in my request handler than provided through the provided adapter abstraction and its express middleware

if you get a chance, i'd love to hear more about your usage and which abstractions you find helpful.

I'm happy to create a PR for this change if you think it'd be of value.

I think its a great idea, and I'd be happy to land this change!

aoberoi avatar Aug 08 '18 23:08 aoberoi

Awesome, thanks @aoberoi! I'll create a PR shortly.

Re usage - our node application only has to listen for one or two events from slack and has functionality beyond the slack integration. I'm hesitant to implement the event emitter interface since it differs from our usual paradigms and so will be harder for the team to maintain and debug. So I'm opting to hand roll a controller that will do most the business logic, and just want to use the library to take care of the more onerous stuff. Since I have only just begun the integration I can't really speak to what is or isn't useful yet about the library and its abstractions, other than noting that this particular method will be very handy.

ianwsperber avatar Aug 09 '18 15:08 ianwsperber