Package com.fedapay.model
Class WebhookSignature
- java.lang.Object
-
- com.fedapay.model.WebhookSignature
-
public class WebhookSignature extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWebhookSignature.Signaturestatic classWebhookSignature.Util
-
Constructor Summary
Constructors Constructor Description WebhookSignature()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventconstructEvent(String payload, String sigHeader, String secret)Returns an Event instance using the provided JSON payload.static EventconstructEvent(String payload, String sigHeader, String secret, long tolerance)static StringgetAlgorithm()StringgetCreatedAt()static longgetDefaultTolerance()StringgetId()StringgetPrivateKey()StringgetPublicKey()StringgetUpdatedAt()voidsetCreatedAt(String createdAt)voidsetId(String id)voidsetPrivateKey(String privateKey)voidsetPublicKey(String publicKey)voidsetUpdatedAt(String updatedAt)
-
-
-
Field Detail
-
ALGORITHM
public static final String ALGORITHM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public String getId()
-
setId
public void setId(String id)
-
getPublicKey
public String getPublicKey()
-
setPublicKey
public void setPublicKey(String publicKey)
-
getPrivateKey
public String getPrivateKey()
-
setPrivateKey
public void setPrivateKey(String privateKey)
-
getCreatedAt
public String getCreatedAt()
-
setCreatedAt
public void setCreatedAt(String createdAt)
-
getUpdatedAt
public String getUpdatedAt()
-
setUpdatedAt
public void setUpdatedAt(String updatedAt)
-
getDefaultTolerance
public static long getDefaultTolerance()
-
getAlgorithm
public static String getAlgorithm()
-
constructEvent
public static Event constructEvent(String payload, String sigHeader, String secret) throws Exception
Returns an Event instance using the provided JSON payload. Throws a JsonSyntaxException if the payload is not valid JSON, and a SignatureVerificationException if the signature verification fails for any reason.- Parameters:
payload- the payload sent by FedaPay.sigHeader- the contents of the signature header sent by FedaPay.secret- secret used to generate the signature.- Returns:
- the Event instance
- Throws:
Exception
-
-