Background
The sample scripts use some software components(jq, base64, etc.) that might not be possible to install or use (due to system restrictions or variations in their features or way of executing).
For those cases, and if docker is available, the easiest solution would be to generate a docker image with the required components, and then set up a sh script to allow the execution of the WIPO sourced scripts.
Docker image
The following dockerfile, would allow to generate a simple image with the most common software tools that are needed for the execution of the scripts.
Optional components
The node package is only required in case you would want to execute "Newman" locally, to automate the testing of the DAS API.
To build the image (locally), you can use the following command:
docker build ./ -t <image_name>
Execute scripts
To generate the asymmetric keys:
See e.1.- Generation of (ES256) asymmetric keys for more info.
Execute docker as:
docker run -it --rm -v $(pwd):/src <image_name> sh /src/scripts/private_key_jwt_generation.sh output_folder private_es256_key_name.pem public_es256_key_name.pem
To retrieve the authentication tocken:
See e.2.- Sample authentication script (using JWT private key)
Execute docker as:
docker run -it --rm -v $(pwd):/src <image_name> sh /src/scripts/jwt-ipo-das.sh authorized_client_id {path_to_private_pem_key}/private_es256_key_name.pem