C# Класс Box.V2.Managers.BoxWebhooksManager

The manager that represents the webhooks V2 endpoints.
Наследование: BoxResourceManager
Показать файл Открыть проект

Открытые методы

Метод Описание
BoxWebhooksManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
CreateWebhookAsync ( BoxWebhookRequest webhookRequest ) : Task

Create a new webhook.

DeleteWebhookAsync ( string id ) : Task

Delete a webhook.

GetWebhookAsync ( string id ) : Task

Get a webhook.

GetWebhooksAsync ( int limit = 100, string nextMarker = null, bool autoPaginate = false ) : Task>

Fetch all defined webhooks for the requesting application and user.

UpdateWebhookAsync ( BoxWebhookRequest webhookRequest ) : Task

Update a webhook.

VerifyWebhook ( string deliveryTimestamp, string signaturePrimary, string signatureSecondary, string payload, string primaryWebhookKey, string secondaryWebhookKey ) : bool

Used to validate an incoming webhook by computing cryptographic digests of the notification's payload and comparing them to the digests computed by Box and placed in the BOX-SIGNATURE-PRIMARY and BOX-SIGNATURE-SECONDARY request headers. For more information about validating webhooks see https://docs.box.com/reference#signatures

Приватные методы

Метод Описание
GetAllWebhooksAsync ( ) : Task>

Описание методов

BoxWebhooksManager() публичный Метод

public BoxWebhooksManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
config IBoxConfig
service IBoxService
converter IBoxConverter
auth IAuthRepository
asUser string
suppressNotifications bool
Результат Box.V2.Auth

CreateWebhookAsync() публичный Метод

Create a new webhook.
public CreateWebhookAsync ( BoxWebhookRequest webhookRequest ) : Task
webhookRequest Box.V2.Models.BoxWebhookRequest BoxWebhookRequest object.
Результат Task

DeleteWebhookAsync() публичный Метод

Delete a webhook.
public DeleteWebhookAsync ( string id ) : Task
id string Webhook id.
Результат Task

GetWebhookAsync() публичный Метод

Get a webhook.
public GetWebhookAsync ( string id ) : Task
id string Webhook id.
Результат Task

GetWebhooksAsync() публичный Метод

Fetch all defined webhooks for the requesting application and user.
public GetWebhooksAsync ( int limit = 100, string nextMarker = null, bool autoPaginate = false ) : Task>
limit int Optional. Defaults to 100, max of 200.
nextMarker string Optional. Used to indicate starting point for next batch of webhooks.
autoPaginate bool Whether or not to auto-paginate to fetch all items; defaults to false.
Результат Task>

UpdateWebhookAsync() публичный Метод

Update a webhook.
public UpdateWebhookAsync ( BoxWebhookRequest webhookRequest ) : Task
webhookRequest Box.V2.Models.BoxWebhookRequest BoxWebhookRequest object.
Результат Task

VerifyWebhook() публичный статический Метод

Used to validate an incoming webhook by computing cryptographic digests of the notification's payload and comparing them to the digests computed by Box and placed in the BOX-SIGNATURE-PRIMARY and BOX-SIGNATURE-SECONDARY request headers. For more information about validating webhooks see https://docs.box.com/reference#signatures
public static VerifyWebhook ( string deliveryTimestamp, string signaturePrimary, string signatureSecondary, string payload, string primaryWebhookKey, string secondaryWebhookKey ) : bool
deliveryTimestamp string Value in BOX-DELIVERY-TIMESTAMP header.
signaturePrimary string Value in BOX-SIGNATURE-PRIMARY header.
signatureSecondary string Value in BOX-SIGNATURE-SECONDARY header.
payload string Body of the incoming webhook request.
primaryWebhookKey string Primary webhook signature key.
secondaryWebhookKey string Secondary webhook signature key.
Результат bool