Class TrustedApplicationsUtility

java.lang.Object
com.saperion.config.TrustedApplicationsUtility

public class TrustedApplicationsUtility extends Object
This singleton class provides the behavior to validate and generate application signature. It reads the clients.properties to keep a list of configured trusted applications.
Author:
schowdhury
  • Method Details

    • getInstance

      public static TrustedApplicationsUtility getInstance()
      Get instance of TrustedApplicationsUtility to authorize Clients of JCS
      Returns:
      instance of TrustedApplicationsUtility
    • validateSignature

      public boolean validateSignature(Object payload, String signature)
      Returns true if the payload and signature is coming from a trusted application, false otherwise
      Parameters:
      payload - payload received from client
      signature - Signature received from client
      Returns:
      true if the payload and signature is coming from a registered application, false otherwise
    • isTrustedApplicationsConfigured

      public boolean isTrustedApplicationsConfigured()
      Return whether trusted applications are configured or not
      Returns:
      true if configured, false otherwise