Class SNSVerifier

java.lang.Object
org.deltava.crypt.SNSVerifier

public class SNSVerifier extends Object
A utility class to verify Amazon SNS messages.
Since:
8.5
Version:
11.1
Author:
Luke
  • Constructor Details

    • SNSVerifier

      public SNSVerifier()
  • Method Details

    • loadCertificate

      public static Certificate loadCertificate(String url) throws IOException, CertificateException, URISyntaxException
      Loads an X.509 certificate from a URL.
      Parameters:
      url - the URL
      Returns:
      the Certificate
      Throws:
      IOException - if the Certificate data cannot be retrieved
      CertificateException - if the Certificate cannot be parse
      URISyntaxException - if the URL cannot be parsed
    • validate

      public static boolean validate(org.json.JSONObject jo)
      Validates an SNS message.
      Parameters:
      jo - a JSONObject with the payload
      Returns:
      TRUE if valid, otherwise FALSE