C# Class Microsoft.AspNet.WebHooks.CustomWebHookReceiver

Provides an IWebHookReceiver implementation that can be used to receive WebHooks from multiple parties supporting WebHooks generated by the ASP.NET Custom WebHooks module. Each party can have a separate shared secret used to sign its WebHook requests. Define an application setting named 'MS_WebHookReceiverSecret_Custom_<name>' containing the secret for each WebHook generator. The corresponding WebHook URI is of the form 'https://<host>/api/webhooks/incoming/<name>'.
Inheritance: Microsoft.AspNet.WebHooks.WebHookReceiver
显示文件 Open project: aspnet/WebHooks Class Usage Examples

Public Methods

Method Description
ReceiveAsync ( string id, System.Web.Http.Controllers.HttpRequestContext context, HttpRequestMessage request ) : Task

Protected Methods

Method Description
VerifySignature ( string id, HttpRequestMessage request ) : System.Threading.Tasks.Task

Verifies that the signature header matches that of the actual body.

Private Methods

Method Description
GetActions ( Newtonsoft.Json.Linq.JObject data, HttpRequestMessage request ) : IEnumerable
WebHookVerification ( string id, HttpRequestMessage request ) : Task

Method Details

ReceiveAsync() public method

public ReceiveAsync ( string id, System.Web.Http.Controllers.HttpRequestContext context, HttpRequestMessage request ) : Task
id string
context System.Web.Http.Controllers.HttpRequestContext
request System.Net.Http.HttpRequestMessage
return Task

VerifySignature() protected method

Verifies that the signature header matches that of the actual body.
protected VerifySignature ( string id, HttpRequestMessage request ) : System.Threading.Tasks.Task
id string
request System.Net.Http.HttpRequestMessage
return System.Threading.Tasks.Task