public static final class Webhook.Signature
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXPECTED_SCHEME |
Constructor and Description |
---|
Signature() |
Modifier and Type | Method and Description |
---|---|
static boolean |
verifyHeader(java.lang.String payload,
java.lang.String sigHeader,
java.lang.String secret,
long tolerance)
Verifies the signature header sent by Stripe.
|
public static final java.lang.String EXPECTED_SCHEME
public static boolean verifyHeader(java.lang.String payload, java.lang.String sigHeader, java.lang.String secret, long tolerance) throws SignatureVerificationException
payload
- the payload sent by Stripe.sigHeader
- the contents of the signature header sent by Stripe.secret
- secret used to generate the signature.tolerance
- maximum difference allowed between the header's
timestamp and the current timeSignatureVerificationException
- if the verification fails.