octokit / webhooks.net

GitHub webhook events toolset for .NET
MIT License
48 stars 31 forks source link

[FEAT]: If the app requires authentication by default, there's no way to configure the webhook endpoint to allow anonymous access? #476

Closed omccully closed 3 months ago

omccully commented 3 months ago

Describe the need

I'm working on a ASP.NET Core that uses Windows authentication by default. However, this authentication blocks the webhook from being received. I haven't found a way to implement this with how Octokit.Webhooks.AspNetCore works currently.

The endpoints.MapPost() method called by MapGitHubWebhooks() returns a IEndpointConventionBuilder that can be used to configure these authentication settings for the endpoint. But the MapGitHubWebhooks method currently returns void. This is how you normally would be able to do this for a MapPost call: app.MapPost(... ).WithMetadata(new AllowAnonymousAttribute()).

I think the MapGitHubWebhooks simply needs to return the IEndpointConventionBuilder, so the caller can decide what additional configuration should be made to the endpoint.

SDK Version

Octokit.Webhooks.AspNetCore 2.1.1

API Version

No response

Relevant log output

No response

Code of Conduct

github-actions[bot] commented 3 months ago

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀