C# 클래스 Webhooks.Consumer.SampleJsonProcessor

파일 보기 프로젝트 열기: exzeo/webhooks-consumer-csharp-sample

공개 메소드들

메소드 설명
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