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

TrimmingTokenizer.cs not available #324

Closed forrestab closed 6 years ago

forrestab commented 6 years ago

I am creating a webhook receiver and need to verify the signature. I am following the slack signature verification filter, but it uses the TrimmingTokenizer class and that does not appear to be available in the latest Microsoft.AspNetCore.WebHooks.Receivers package.

Is it in another package, am I missing something?

dougbu commented 6 years ago

We do not plan to make this utility generally available.

If you're creating your receiver in a fork of the aspnet/WebHooks repo, suggest doing as the Slack receiver does in its project file: https://github.com/aspnet/WebHooks/blob/9bdc69147f8a51b974bdd4179e47bc006e823d00/src/Microsoft.AspNetCore.WebHooks.Receivers.Slack/Microsoft.AspNetCore.WebHooks.Receivers.Slack.csproj#L8-L10

For receivers outside this repo i.e. not in a fork, feel free to use the TrimmingTokenizer.cs code in accordance with its license.

forrestab commented 6 years ago

Yes, I am creating a receiver outside of this repo and thats a shame because I would rather not have to keep checking to see if it has been updated.

Is there any particular reason you all are not making it available? Is it because you want us to write our own or you want us to fork and create receivers in this repo? Just curious.

dougbu commented 6 years ago

Is there any particular reason you all are not making it available?

@forrestab it's a low-level utility that we prefer not to expose from a WebHooks package; doesn't fit in the public API. We also had no call for this struct in other aspnet repos, which meant it was not a candidate for the Microsoft.Extensions.Primitives package. But, I'll ask around to see if your request is enough to reconsider including it there.

dougbu commented 6 years ago

@forrestab there's also proposals in dotnet/corefx which seem very similar to TrimmingTokenizer but the roadmap isn't clear. I asked about the timeline in dotnet/corefx#26528.

dougbu commented 6 years ago

Closing given you can use the TrimmingTokenizer source until dotnet/corefx#26528 does the needful.

For receivers outside this repo i.e. not in a fork, feel free to use the TrimmingTokenizer.cs code in accordance with its license.