When using the hash handlebar helper to generate an authentication header or URI parameter, integrator.io provides and populates a set of hashOptions fields you can use to create the signature. hashOptions is a JSON object that contains fields that are commonly used to create authentication signatures (such as the request body and the URI). The following table lists all available fields:
Note
Note: For demonstration purposes, the examples provided use the following full URL:https://www.celigo-test.com/this/is/a/test?username=Integrator&domain=IO
Field name |
Description |
---|---|
hashOptions.headers |
Path to parameters sent in the request header. |
hashOptions.body |
The HTTP request body, in string format. |
hashOptions.bodyParametersMap |
Path to parameters sent in request body. |
hashOptions.method |
The HTTP request method (verb). For example, PUT, POST, GET, etc. |
hashOptions.http.encrypted |
The contents of the http.encrypted field from your HTTP connection. If you store the key in your HTTP connection as hashKey, it is available for use as hashOptions.http.encrypted.hashKey. |
hashOptions.baseURI |
The base URI used in the request. In this example, the value is: www.celigo-test.com |
hashOptions.relativeURI |
The relative URI used in the request. In this example, the value is: /this/is/a/test |
hashOptions.urlParameters* |
The URL parameters used in the request. In this example, the value is: username=Integrator&domain=IO |
hashOptions.urlParametersMap |
Path to parameters sent in request URL. |
hashOptions.URI* |
The full URI used in the request. In this example, the value is: https://www.celigo-test.com/this/is/a/test?username=Integrator&domain=IO |
* Not available with authentication URL parameters.
To create an HASH-SHA256 digest from the full URI in base64 format:
{{{hash "sha256" hashOptions.http.encrypted.hashKey "base64" hashOptions.URI}}}
To create an HASH-SHA256 digest from the request body in hexadecimal format:
{{{hash "sha256" hashOptions.http.encrypted.hashKey "hex" hashOptions.body}}}
Comments
0 comments
Please sign in to leave a comment.