Package com.saperion.config
Class TrustedApplicationsUtility
- java.lang.Object
-
- com.saperion.config.TrustedApplicationsUtility
-
public class TrustedApplicationsUtility extends java.lang.ObjectThis 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TrustedApplicationsUtilitygetInstance()Get instance ofTrustedApplicationsUtilityto authorize Clients of JCSbooleanisTrustedApplicationsConfigured()Return whether trusted applications are configured or notbooleanvalidateSignature(java.lang.Object payload, java.lang.String signature)Returns true if the payload and signature is coming from a trusted application, false otherwise
-
-
-
Method Detail
-
getInstance
public static TrustedApplicationsUtility getInstance()
Get instance ofTrustedApplicationsUtilityto authorize Clients of JCS- Returns:
- instance of
TrustedApplicationsUtility
-
validateSignature
public boolean validateSignature(java.lang.Object payload, java.lang.String signature)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
-
-