WebhookSigner
final class WebhookSigner (View source)
테스트와 로컬 확인용으로 웹훅에 Standard Webhooks 서명을 만듭니다.
서명 규칙은 WebhookVerifier와 같으므로 이 서명기가 만든 헤더는 WebhookVerifier::verify()를 통과합니다.
Methods
__construct(string $webhookSecret)
WebhookVerifier와 같은 webhookSecret으로 서명기를 초기화합니다.
array
__debugInfo()
인증 정보가 디버그 출력에 노출되지 않도록 빈 정보를 반환합니다.
array
__serialize()
인증 정보가 직렬화되어 노출되지 않도록 직렬화를 거부합니다.
void
__unserialize(array $data)
인증 정보가 포함된 객체의 역직렬화를 거부합니다.
string
sign(string $msgId, int $timestamp, string $body)
webhook-signature 헤더 값을 반환합니다.
array
headers(string $body, string|null $msgId = null, int|null $timestamp = null)
webhook-id, webhook-signature, webhook-timestamp 헤더를 반환합니다.
Details
__construct(string $webhookSecret)
WebhookVerifier와 같은 webhookSecret으로 서명기를 초기화합니다.
array
__debugInfo()
인증 정보가 디버그 출력에 노출되지 않도록 빈 정보를 반환합니다.
array
__serialize()
인증 정보가 직렬화되어 노출되지 않도록 직렬화를 거부합니다.
void
__unserialize(array $data)
인증 정보가 포함된 객체의 역직렬화를 거부합니다.
string
sign(string $msgId, int $timestamp, string $body)
webhook-signature 헤더 값을 반환합니다.
array
headers(string $body, string|null $msgId = null, int|null $timestamp = null)
webhook-id, webhook-signature, webhook-timestamp 헤더를 반환합니다.