Skip to content

Merge aspnet/WebHooks into this repository #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 335 commits into from
Oct 10, 2018
Merged

Conversation

natemcmaster
Copy link
Contributor

Part of dotnet/aspnetcore#3598

This merges the history of https://github.com/aspnet/WebHooks into this repository. The only changes between this PR and latest commit on master of aspnet/WebHooks are:

  • removed KoreBuild
  • removed other CI infrastructure bits
  • updated the readme and RepositoryUrl values
  • reorganized all of aspnet/WebHooks into src/WebHooks/

Andrew Shen and others added 30 commits January 11, 2016 11:55
Added details to update links
Add MS_WebHookStripeInTestMode to execute custom StripeWebHookHandlers for test events ('evt_00000000000000')
Add StripeEvent and StripeEventData classes
…t to conflict with System.Configuration.SettingsProvider.
… a Controller or ApiController, for example from an Azure WebJob. When used with WebJobs, this can be used for sending WebHooks as a result of a messages arriving for a WebJob triggered by an Azure queue, blog, table, Service Bus Queue, or any other source that can trigger a WebJob, see https://azure.microsoft.com/en-us/documentation/articles/websites-webjobs-resources/ for more details.
Updated readme with new blog links
Added link to CRM blog
…lack.com/slash-commands' We now provide support for more easily responding with structured text allowing you to fully take advantage of all Slash Command features including including images, tables, and a variety of properties including author, title, etc.
…ommands style of the format

  /command action value
  /command action p1=v1; p2=v2; ...

An example of an outgoing WebHook or slash command using the first format is '/assistant query what's the weather?' where '/assistant' is the trigger word or slash command, 'query' is the action and 'what's the weather?' is the value.

In the second form, parameter values containing semi-colons can either escape the semi-colon using a backslash character, i.e '\;', or quote the value using single quotes or double quotes. An example of an outgoing WebHook or slash command using this format is '/appointment add title=doctor visit; time=Feb 3 2016 2 PM; location=Children's Hospital' where '/appointment' is the trigger word or slash command, 'add' is the action and title, time, and location are parameters.

This makes it much simpler to add support for Slack slash commands and outgoing webhook that take parameters from the user.

Updated the SlackSample to illustrate use of this for both outgoing webhooks and slash commands.
…going through the WebHookRegistrationsController Web API controller allowing an IWebHookRegistrar implementation to change, modify, or reject WebHook registrations as they are created or updated.

This can for example be used to add filters to registrations enabling broadcast notifications or specific group notifications. Filters added this way can either be publicly visible or private filters intended for server side processing only.

In the former case, any filters added in an IWebHookRegistrar implementation  must be listed by an IWebHookFilterManager implementation. In the latter case, the filter must be prefixed by the string "MS_Private_" to remain hidden from the user. Failure to do either of these will lead to WebHook registration updates being rejected due to unknown filters.
…es so that users don't *have* to use DI to change the default implementation. It of course still works *if* they want to use DI, not it is just not a hard requirement just to change where config settings come from.
…get called when a WebHook succeeds, is gone, or fails. This enables for a variety of post-send processing scenarios where an implementation may want to take certain actions depending on the result of a WebHook send.
…ot all instances come in through the ASP.NET Web API registration controller, we have to run validation explicitly to verify that we have a correct WebHook registration.

To validate a WebHook instance, call IWebHookManager.VerifyWebHookAsync which will also verify that the registered WebHook URI is valid.
- Tag mandatory properties with Required.Always so JSON.NET enforces the requirement during (de)serialization
- Fix a couple of comment typos on KuduNotification
- Add required 'resourceRegion' property to AlertMessage1.json test content
- Add AlertMessage3.json to validate change against sample payload in Azure docs
- Add unit tests
…eans that geo- and tag-based subscriptions no longer work. Only user-based subscriptions which again mean that we must have an OAuth token in order to actually receive the media posted.

Updated Instagram receiver sample to reflect this: It now supports oauth authentication for a user to log in and to consent an Instagram Application. Once that is done, it is possible to receive notifications,
dougbu and others added 19 commits July 25, 2018 21:10
- not necessary with Global Routing disabled

This reverts commit fad82fd.
Disable Global Routing in all applications using WebHooks
- use a merge commit to keep the very different pieces somewhat separate
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
[auto-updated: dependencies]
Copy link
Contributor

@Eilon Eilon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm.... I guess it's good 😄

@@ -9,11 +9,17 @@
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)eng\AspNetCore.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>7.3</LangVersion>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems unrelated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is 7.0. KoreBuild overrides the default to 7.2, so I had to add this after removing KoreBuild stuff.

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can only see the 250+ commits and the files (not e.g. the commit graph) but what I can see looks good.

@natemcmaster natemcmaster merged commit 35541c8 into master Oct 10, 2018
@natemcmaster natemcmaster deleted the namc/webhooks branch October 10, 2018 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.