Hi,
I am trying to consume a REST API in APEX 21.2 which requires a dynamic http header authorization like this:
Authorization: Signature keyId="{API-KEY}",algorithm="hmac-sha256",
headers="(request-target) host date content-type content-length",
signature="{BASE64-HMAC-VALUE}"
Example of the HTTPS request:
POST /v2/cases HTTP/1.1
Host: xxx.xxx.com
Date: Tue, 07 Jun 2020 20:51:35 GMT
Content-Type: application/json
Content-Length: 88
Authorization: Signature keyId="1234",algorithm="hmac-sha256",
headers="(request-target) host date content-type content-length",
signature="Iktz/AdXHmDouNm6uBB8ZW0xcfNGuWGDxmX9TFMwuF0="
{
"xxx": "xx xxx x",
"yyy": "yyyyy yy",
"yyy": ["XXXXX"]
}
I have checked the documentation and the examples but I cannot find more information how to best implement this. How can I set this dynamic part? Is there any similar example available?
Thank you for your answer in advance
Reinhard