Method.
Setting the Authentication Method for the API
In the configuration.json file (located in api directory), there is an authentication setting. You can choose the preferred authentication method:
No authentication - remove the line:
"authentication": "publicKey.pem",Public/Private key authentication - specify the
.pemfile with the public key:
"authentication": "publicKey.pem",Secret-based authentication - create a file containing the secret and specify the filename:
"authentication": "secret.txt",Ensure that the file contains only the secret (no newlines). For example, you can create it on Linux:
echo -n 'secret' > secret.txtAfter updating the configuration, restart the API service to apply the changes.
JWT Token Guidelines
Please take into consideration these guidelines when generating the JWT token:
the expiration date should be included as an integer, not a string;
the secret has to be base64 encoded in the token;
the token should be encoded with base64URL.
Last updated