All examples shown below fails, because samples does not contain appropriate adscore signature and key. These samples show usage of the Signature Verify API, and should be used with correct data.
ConstantArgumentsBaseSample.java
Does not take any parameters,
it`s a pure example of usage of the lib API with hardcoded parameters values. See how to execute it in point 3rd.
AllArgumentsSample.java
To execute this example, appropriate parameters have to be provided via command-line.
See how to execute it in point 3rd.
Other samples takes parameters from sample users.
In order to use this project: - JRE 1.8 or higher is requiredAt first step, build a jar file from sample sources. e.g by executing:
./gradlew jar
Next execute one of follofing samples:
``` java -jar build/libs/client-libs-java-samples-1.0.4.jar base-sample ``` ``` java -jar build/libs/client-libs-java-samples-1.0.4.jar all-args-sample adscoreSignatureBase64Encoded "Mozilla/5.0" "customer" "adscoreKeyBase64Encoded" true 30 "92.96.235.182" "2001:8f8:1825:a600:950b:dae2:b606:640" ```Output of all samples is print out to a standard output.
The meaning of all parameters are explained in the lib readme: https://github.com/Adscore/client-libs-java/blob/master/README.md
or in JavaDocs: https://github.com/Adscore/client-libs-java/blob/master/src/main/java/com/adscore/signature/SignatureVerifier.java