我尝试使用Curl来执行duoapi的调用。在
我试着在这里查看他们的文档:https://duo.com/docs/adminapi#authentication
文档说将creds作为请求的HMAC密钥传递,但现在确定如何实现这一点。在
到目前为止我得到的是:
curl --request GET \
--header 'Authorization: Basic 'Integration key:Secret key'' \
--header "Content-Type: application/x-www-form-urlencoded" \
"https://api-12345678.duosecurity.com/auth/v2/check"
它回来了
^{pr2}$有人能给我指出正确的方向吗。如果不是在Python中。在
首先,您的请求格式似乎不正确,因为
Integration key:Secret key''
在标头之外(看看问题中突出显示语法的方式)。在尝试:
头名称带有空格和小写字母(如
Integration key
)的情况有些少见,因此您可能需要尝试使用变体,如Integration-Key
。在第二个,序列错误mean:
您需要添加丢失的
Date
头,这是authenticator所必需的。在如果有人无意中发现了这一点,我的想法是:
运行此操作将产生:
参考号:Duo Api docs section on authentication
相关问题 更多 >
编程相关推荐