C# Класс Webhooks.Consumer.SampleJsonProcessor

Показать файл Открыть проект

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

Метод Описание
EnsureAuthenticatedPost ( String inboundHash, String inboundJson, String secretToken ) : bool

Verifies the inbound JSON message is a valid one or not

Handle ( ) : Response
SampleJsonProcessor ( Nancy.NancyModule module, IWebhookSettings settings ) : System
ToHexString ( byte array ) : string

Generates a hexadecimal formatted string for the given byte array

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

Метод Описание
GetMessageHash ( string value, string salt ) : byte[]

Generates a HMA SHA1 hexdigest for a given string using a salt

JsonPrettify ( string json ) : String

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

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

Verifies the inbound JSON message is a valid one or not
public EnsureAuthenticatedPost ( String inboundHash, String inboundJson, String secretToken ) : bool
inboundHash String Hash value sent through the HTTP header
inboundJson String JSON body HTTP posted
secretToken String Secret token set by the webhook
Результат bool

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

public Handle ( ) : Response
Результат Nancy.Response

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

public SampleJsonProcessor ( Nancy.NancyModule module, IWebhookSettings settings ) : System
module Nancy.NancyModule
settings IWebhookSettings
Результат System

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

Generates a hexadecimal formatted string for the given byte array
public static ToHexString ( byte array ) : string
array byte Array of bytes
Результат string