我尝试使用JWT身份验证,但API返回400 Bad request {" error":" invalid_request"}。
标题:
POST https://account-d.docusign.com/oauth/token HTTP/1.1
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=utf-8
身体:
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=XXXX
JWT令牌格式正确,包含正文:
iss = _clientIntegratorKey,
sub = "628c4cc3-d36e-4a6b-80bf-b7ccb97d842c",
iat = (long)(now - new DateTime(1970, 1, 1)).TotalSeconds,
exp = (long)(now.AddSeconds(3600) - new DateTime(1970, 1, 1)).TotalSeconds,
aud = "account-d.docusign.com",
scope = "signature"
我缺少什么?
答案 0 :(得分:0)
我使用自己的RSA函数,不使用正确的密码算法进行加密。
现在我使用一个库(c#dotnet core:RSACryptoServiceProvider)来做它,它就像一个魅力。