When using the Bridge API, Hashing doesn’t work (but tokens DO work).
Time seem to be ok:
$ curl -s "192.168.188.16:8080/info?token=${TOKEN}" | jq | grep currentTime ; ruby -r time -e 'puts Time.now.utc.iso8601'
"currentTime": "2019-07-16T16:40:24+00:00",
2019-07-16T16:40:24Z
I do the following to construct a token:
ruby -r time -r digest -e "token=ENV['TOKEN']; rnr=rand(1001..9999); ts=Time.now.utc.iso8601; hash=Digest::SHA256.hexdigest(%Q(#{ts},#{rand},#{token})); puts %Q(ts=#{ts}&rnr=#{rnr}&hash=#{hash})"
which results into
ts=2019-07-16T16:41:48Z&rnr=6750&hash=ecc16fbebf5c2d90839da2bba1b6e5ac1a8d0d9bba97d7b4de2e8c5fb0b8a6e2
But using this result like
curl -s "192.168.1.10:8080/info?${QUERY_PARAMS}"
always returns
HTTP 401 Unauthorized
Any ideas?