0

目前,我正在开发一个只有访问密钥和密钥可用的 API。要访问他们的 API,我需要在 algorithm="hmac-sha256.

他们有一些python代码作为例子

response = requests.post('https://' + host + url_path,
                         json=body,
                         auth=HTTPSignatureAuth(algorithm="hmac-sha256",
                                                key=b64decode(key_secret_id),
                                                key_id=key_id,
                                                headers=[
                                                    '(request-target)', 'host',
                                                    'date', 'content-type',
                                                    'content-length'
                                                ]),
                         headers=headers)

但我正在尝试使用 java 访问它,但没有得到任何好的库或建议来做同样的事情。

如果有人帮助我或建议我任何解决方案,那将非常有帮助..

4

0 回答 0