Package com.saperion.config
Class TrustedApplicationsUtility
java.lang.Object
com.saperion.config.TrustedApplicationsUtility
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 Summary
Modifier and TypeMethodDescriptionstatic TrustedApplicationsUtility
Get instance ofTrustedApplicationsUtility
to authorize Clients of JCSboolean
Return whether trusted applications are configured or notboolean
validateSignature
(Object payload, String signature) Returns true if the payload and signature is coming from a trusted application, false otherwise
-
Method Details
-
getInstance
Get instance ofTrustedApplicationsUtility
to authorize Clients of JCS- Returns:
- instance of
TrustedApplicationsUtility
-
validateSignature
Returns true if the payload and signature is coming from a trusted application, false otherwise- Parameters:
payload
- payload received from clientsignature
- 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
-