【发布时间】:2021-04-22 07:59:33
【问题描述】:
最近为DocuSign集成集成了基于JWT的auth,在指向演示DocuSign的开发环境中,没有问题。但是在生产环境中,我们在通过传递 oAuthToken 检索 login_information 时面临以下问题
400 HTTP/1.1 400 Bad Request
{
"errorCode": "UNSPECIFIED_ERROR",
"message": "String cannot be of zero length.\r\nParameter name: oldValue"
}
根据 wiki,我使用下面的 url 来生成令牌
对于开发者演示环境,基本 URI 是 https://account-d.docusign.com/oauth/auth 对于生产平台,基本 URI 为 https://account.docusign.com/oauth/auth
如果令牌包含点 (.),我可以针对生产端点重现该问题。
curl -H "Authorization:Bearer eyJ0eXAiOiJNVCIsImFsZyI6IlJTMjU2Iiwia2lkIjoiNjgxODVmZjEtNGU1MS00Y2U5LWFmMWMtNjg5ODEyMjAzMzE3In0.AQoAA" -H "Content-Type: application/json" -X GET https://www.docusign.net/restapi/v2/login_information
{
"errorCode": "UNSPECIFIED_ERROR",
"message": "String cannot be of zero length.\r\nParameter name: oldValue"
}
使用与演示端点相同的身份验证令牌,上述错误不可重现。
curl -H "Authorization:Bearer eyJ0eXAiOiJNVCIsImFsZyI6IlJTMjU2Iiwia2lkIjoiNjgxODVmZjEtNGU1MS00Y2U5LWFmMWMtNjg5ODEyMjAzMzE3In0.AQoAA" -H "Content-Type: application/json" -X GET https://demo.docusign.net/restapi/v2/login_information
{
"errorCode": "USER_AUTHENTICATION_FAILED",
"message": "One or both of Username and Password are invalid. Invalid access token"
}
【问题讨论】:
标签: jwt docusignapi