请求签名

请求说明

1:所有请求都是POST方式

2:请求内容分:body,header两部分,body中存放请求具体内容,header中存放对body的签名sign

数据签名

sign=HmacSHA512(body,tokenKey)

示例:

假如分配的token和tokenKey如下:

token=384fc783fcc34762bdfc100517675722

tokenKey=0f6e65ab7cf3437abb30a8f41afa08b8

请求数据:body={"AppCode":"384fc783fcc34762bdfc100517675722","a":"a"}

签名值:sign=HmacSHA512({"AppCode":"384fc783fcc34762bdfc100517675722","a":"a"},0f6e65ab7cf3437abb30a8f41afa08b8)

=f91084219ac896ecef9ae9f8ba124054c96517515352aaef158fdc1a14eeafdf5dce0485e3bdbb799e833e97ba86359f49e1e4af564e2bf8e1807a26a1065d6e

最终请求为:


curl -X POST -H 'content-Type:application/json;sign:f91084219ac896ecef9ae9f8ba124054c96517515352aaef158fdc1a14eeafdf5dce0485e3bdbb799e833e97ba86359f49e1e4af564e2bf8e1807a26a1065d6e' -d '{"AppCode":"384fc783fcc34762bdfc100517675722","a":"a"}' https://a1.fubaox.com/api

签名工具:

输入body内容

HmacSHA512签名用的tokenKey: