aspnet / WebHooks

[Archived] Libraries to create and consume web hooks on ASP.NET Core. Project moved to https://github.com/aspnet/AspLabs
Apache License 2.0
627 stars 439 forks source link

WebHookManager request #69

Closed alfhv closed 8 years ago

alfhv commented 8 years ago

Current implementation of WebHookManager, method VerifyWebHookAsync(), do basically 3 validations steps on a webhook:

So far is good, but ...I have my own webhook server and clients and I want to implement my own validation. I'm then registering my own WebHookManager class on IDependencyScope and all works OK.

Point is that I would like to reuse same existing validations steps (3 points mentioned above) some times, and some other custom steps, in different scenarios depending of the client and other internal logic.

Could be possible to extract validation steps to methods and allow a nice inheritance on this class: WebHookManager ??

see basic sample here: [https://gist.github.com/alfhv/f0f57bab74bec6378514446449014250]

thanks,

HenrikFrystykNielsen commented 8 years ago

That makes a lot of sense! I like your example -- I can either do it or you can submit a PR -- both work fine :)

thanks!

henrik

HenrikFrystykNielsen commented 8 years ago

Thanks for the pull request! Commit ID: 448fc48d6c5d48b6001dd764d1d70b490328dc1e

HenrikFrystykNielsen commented 8 years ago

Nugets have been updated -- look for version rc1d!