- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我的帐户中,我创建了一个 Connect webhook 配置。我添加了一个 key ,还选中了 Include HMAC signature 复选框。
在我签署信封后,DocuSign Connect 调用了我的 API。
它发送了一个成功的请求正文但它没有发送预期的请求 header x-docusign-signature。
我从 DocuSign connect 获得了以下请求 header 。
{host=[qa.****.com],
content-type=[text/xml; charset=utf-8],
expect=[100-continue], max-forwards=[9],
x-forwarded-proto=[https],
x-forwarded-port=[443],
x-original-host=[qa.****.com],
x-original-url=[/****/v1/docusign/webhook/1177/4305],
x-forwarded-for=[162.248.186.11:58652, 10.3.0.5],
x-arr-ssl=[2048|256|C=US, S=Arizona, L=Scottsdale, O="GoDaddy.com, Inc.", OU=http://certs.godaddy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2|OU=Domain Control Validated, CN=qa.cloudlex.com],
x-arr-log-id=[06ca1160-b70c-41d9-8e8c-6e018983ad94],
x-forwarded-host=[qa.****.com],
x-forwarded-server=[qa.****.com],
connection=[Keep-Alive], content-length=[2184]
}
感谢您的帮助。
最佳答案
目前,关于 HMAC 身份验证的文档具有严重的误导性,因为它建议您只需在站点的管理部分启用它。
发送信封时,您还需要在信封的 EventNotification 部分设置“IncludeHMAC”设置。
此代码基于 C# DocuSign 客户端,但应同样适用于其他语言。
public EventNotification BuildEventNotifications(string callbackUrl)
{
return new EventNotification
{
IncludeEnvelopeVoidReason = "true",
EnvelopeEvents = new List<EnvelopeEvent>
{
new EnvelopeEvent("sent", "false"),
new EnvelopeEvent("delivered", "false"), // When opened
new EnvelopeEvent("completed", "true"), // When signed
new EnvelopeEvent("declined", "false"),
new EnvelopeEvent("voided", "false")
},
Url = callbackUrl,
LoggingEnabled = "true",
IncludeHMAC = "true",
IncludeDocuments = "false",
RequireAcknowledgment = "true",
RecipientEvents = new List<RecipientEvent>
{
new RecipientEvent("false", "Sent"),
new RecipientEvent("false", "Delivered"),
new RecipientEvent("true", "Completed"),
new RecipientEvent("false", "Declined")
}
};
}
这是一个如何在 Api 端验证其 HMAC 签名的示例。 Web Api/.NET Core 中的示例,但应该很容易转换为 Java 或您选择的框架。
public class HMACAuthorization : Attribute, IAuthorizationFilter
{
public void OnAuthorization(AuthorizationFilterContext context)
{
string xmlBody;
context.HttpContext.Request.Body.Seek(0, SeekOrigin.Begin);
using (var reader = new StreamReader(context.HttpContext.Request.Body, Encoding.UTF8, true, 1024, true))
{
xmlBody = reader.ReadToEnd();
}
context.HttpContext.Request.Headers.TryGetValue("X-DocuSign-Signature-1", out var hmacSignature);
if (!HmacIsValid(ConfigurationSettings.DocuSignHMACKey, xmlBody, hmacSignature)) context.Result = new UnauthorizedResult();
}
private static bool HmacIsValid(string hmacKey, string body, string hmacSignature)
{
var computedHmac = BuildHmacHash(hmacKey, body);
var hmacIsValid = computedHmac == hmacSignature;
return hmacIsValid;
}
private static string BuildHmacHash(string hmacKey, string body)
{
string hash;
using (var sha = new HMACSHA256(Encoding.UTF8.GetBytes(hmacKey)))
{
hash = Convert.ToBase64String(sha.ComputeHash(Encoding.UTF8.GetBytes(body)));
}
return hash;
}
}
如果您在 .NET Core/Web Api 中使用示例,则需要在 Http 请求正文中启用倒带。您可以使用这个中间件来实现此功能。
public class EnableRequestRewindMiddleware
{
private readonly RequestDelegate _next;
public EnableRequestRewindMiddleware(RequestDelegate next)
{
_next = next;
}
public async Task Invoke(HttpContext context)
{
context.Request.EnableRewind();
await _next(context);
}
}
app.UseMiddleware<EnableRequestRewindMiddleware>();
关于java - DocuSign Connect webhook 调用不包含 HMAC header x-docusign-signature,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56673644/
我正在关注此处显示的 React OAuth 隐式示例:https://github.com/docusign/eg-02-react-implicit-grant我很困惑,我们的 React SPA
当我登录到我的 docusign 真实账户管理面板时,我在 API 和 key 菜单下看不到任何添加集成商 key 按钮。 那么现在,我如何生成积分器 key ? 最佳答案 直播 Integrator
在我的帐户中,我创建了一个 Connect webhook 配置。我添加了一个 key ,还选中了 Include HMAC signature 复选框。 在我签署信封后,DocuSign Conne
在我的帐户中,我创建了一个 Connect webhook 配置。我添加了一个 key ,还选中了 Include HMAC signature 复选框。 在我签署信封后,DocuSign Conne
我是 DocuSign 集成的新手。看来我需要使用 OAuth 授权代码授予,所以我正在使用类似这样的 GET 方法: https://account-d.docusign.com/oauth/aut
我在使用由“https://demo.docusign.net”提供的 Docusign Rest API 时遇到 ssl 认证错误' 在 IBM websphere 中。我下载'演示 ssl 证书并
我正在尝试为客户创建解决方案。客户经营一所大学并想要一个系统,他们可以使用该系统将包含标记/评分的批量信件发送给家长/监护人。这些信件必须由大学院长(单一用户)签名。 用户(院长)是否必须进入 Doc
如何检查文档是否使用 DocuSign API 签名?是否存在让我知道文档状态的任何 API 服务? 我试图获取“已完成”文件夹中的所有对象,但响应不包含 documentId,我不知道每个对象是哪个
我正在尝试让 Docusign 处理基于几个参数生成的 PDF 文档。工作流程是,用户将生成 PDF,然后当单击按钮时,它将带来带有此 PDF 的 docusign iFrame。用户签名和文档签名会
是否可以通过 API 获取 DocuSign 文档的每个收件人的状态?获取收件人状态的 xml/java 是什么?我用不同人的电子邮件发送信封,但是当我使用此处描述的过程时 http://iodocs
我已经尝试了 API 中给出的代码授权示例 (PHP),它们工作得非常好,但是对于那些示例,我尝试了隐式身份验证,但它不起作用。我不熟悉如何使用 twig 函数。 我也是 Docusign 的新手,任
我正在使用 DocuSign Java SDK 并尝试使用 JWT 流获取访问 token 。当我调用 ApiClient.requestJWTUserToken 时,出现错误: "POST http
我正在构建一个基于信封的 Webhook 来接收来自 DocuSign 的状态更新,而不是我当前基于“轮询”的方法。我有以下代码来创建 RecipientEvent RecipientEvent au
我对Docusign embedded Edit View.有疑问 我的应用程序通过 JWT 连接到 Docusign。使用 API,我允许用户通过我自己的应用程序编辑现有信封(处于草稿状态时)。到文
$(document).ready(function () { debugger; $.ajax({ type: "GET", headers: { "
我需要使用带有数据验证的自定义标签创建 DocuSign 信封。收件人在自定义标签中输入的值需要进行验证,以便收件人输入的值不会超过特定值。 我尝试使用正则表达式,但它们只验证特定范围内输入的数字。
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 7 年前。 Improve this ques
我正在 iOS 应用程序中使用 DocuSign 的 API 来签署文档。除了抄送体验之外,一切都很顺利。 我有两个签名者,路由顺序为 1 和 2。然后,我有几个 CC 收件人,全部路由顺序为 3。
我在我的应用程序中生成 PDF,我应该将该 PDF 发送给特定人员(电子邮件 ID)以进行电子签名。我使用 DocuSign Sandbox 开发环境。收件人会收到一封电子邮件通知,要求其查看文档并进
我在正确理解 DocuSign API 时遇到了一些问题。 我的第一个任务是简单地发送和创建一个信封。我使用 UIView 和 Core Graphics 创建了一个 PDF(在 iOS 中)。然后我
我是一名优秀的程序员,十分优秀!