Hi,
We're trying to use SecretCallbackKey to protect a subscription of a sensor to provider's cloud, but we're not able to get the correct HMAC. We've applied pseudocode as described in documentation:
var md5Body = MD5(body)
var endpoint = endpoint_configured_in_subscription
var secretKey = secret_key_configured_in_subscription
var currentDate = value_http_header_Sentilo-Date
var contentToSign = concatenate('POST',md5Body, 'application/json',currentDate, endpoint)
var signature = HmacSHA512(contentToSign)
return base64UrlEncode(signature)
We only get a signature with the correct length using HmacSHA256 insted of HmacSHA512. This suggests us another confusion may be in the process.
But, any way chain send by sentilo doesn't check with ours.
Could we practice with an example case, to see the process step by step?
Thanks in advance,
Roger Xandri