public class WebhookVerifier
extends java.lang.Object
| Constructor and Description |
|---|
WebhookVerifier(java.util.function.Supplier<java.lang.String> secureTokenLookup) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isPayloadLegitimate(java.lang.String securityKey,
java.lang.String payload)
Determines if a payload was sent by GitHub via an agreed-upon token and hashing strategy
|
public WebhookVerifier(java.util.function.Supplier<java.lang.String> secureTokenLookup)
secureTokenLookup - Supplier which provides an agreed-upon secret key for verifying GitHub payloadspublic boolean isPayloadLegitimate(@Nullable
java.lang.String securityKey,
java.lang.String payload)
securityKey - The header provided with the event with the hash to verifypayload - The payload that was sent with the header