Modifier and Type | Field and Description |
---|---|
static String |
EXPECTED_SCHEME |
Constructor and Description |
---|
Signature() |
Modifier and Type | Method and Description |
---|---|
static boolean |
verifyHeader(String payload,
String sigHeader,
String secret,
long tolerance)
Verifies the signature header sent by Stripe.
|
public static final String EXPECTED_SCHEME
public static boolean verifyHeader(String payload, String sigHeader, 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.Copyright © 2017 Stripe. All rights reserved.