问题
Thanks in advance for any and all help.
I am trying to implement "legacy header authentication" as described on this page: https://docs.docusign.com/esign/guide/authentication/legacy_auth.html
I have my email address, password, and integration key pieced together in the X-DocuSign-Authentication header as follows:
"{\"Username\":\"" + usr + "\", \"Password\":\"" + pwd + "\", \"IntegratorKey\":\"" + intKey + "\"}";
I have tested this mechanism from Postman, Fiddler, and C# (using the example loginApi()
method on https://www.docusign.com/developer-center/recipes/request-a-signature-via-email), and get the same error each way.
Basically says: authentication required, and no credentials. Full error details follow:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Message.TemplateName: authenticationrequired
Message.Language:
Fallback templates
-->
<html>
<!--Head-->
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<script src="/mwg-internal/de5fs23hu73ds/files/javascript/sw.js" type="text/javascript" ></script>
<script src="/mwg-internal/de5fs23hu73ds/files/default/geolocation.js" type="text/javascript" ></script>
<title>McAfee Web Gateway - Notification - Authentication Required</title>
<link rel="stylesheet" href="/mwg-internal/de5fs23hu73ds/files/default/SystemStyleSheet.css" />
</head>
<!--/Head-->
<!--Body-->
<body onload="swOnLoad();">
<table class="errorPageContainer" background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_body.gif' >
<tr>
<td colspan="2">
<img src='/mwg-internal/de5fs23hu73ds/files/default/img/logo_mwg.png' />
</td>
<tr/>
<tr>
<td>
</td>
<td>
<!--Contents-->
<h1 class='nodisplayAuthentication Required'>Authentication Required</h1>
<h1>Authentication Required</h1>
<!--Content-->
<table class="contentTable">
<tr>
<td class="contentData">
You must be authenticated to access this URL.
</td>
</tr>
</table>
<script language="javascript" type="text/javascript">
urlprotocol = "https";
statuscode=407;
if(statuscode==401 && urlprotocol == "ftp"){
document.write("<form name=\"ftpform\" method=\"get\" action=\"\">");
document.write("<table class=\"contentData\">");
document.write("<tr><td class=\"contentData\" colspan=2>Please enter your credentials in the form below and click \"Access FTP\" button if your browser doesn't present authentication prompt for FTP sites.</td></tr>");
document.write("<tr><td class=\"contentData\">Username:</td><td><input type=\"text\" id=\"ftpUsername\" name=\"ftpUsername\" size=40 /></td></tr>");
document.write("<tr><td class=\"contentData\">Password:</td><td><input type=\"password\" id=\"ftpPassword\" name=\"ftpPassword\" size=40 /></td></tr>");
document.write("<tr><td class=\"contentData\" colspan=2 align=center><input type=\"button\" onclick=\"redirectToFTP();\" value=\"Access FTP\" /></td></tr>");
document.write("</table>");
document.write("</form>");
}
function redirectToFTP(){
var username=unescape(document.getElementById("ftpUsername").value);
var password=unescape(document.getElementById("ftpPassword").value);
location.href = "ftp://"+username+":"+password+"@www.docusign.net:443"
}
</script>
<!--/Content-->
<!--Info-->
<table class="infoTable">
<tr>
<td class="infoData">
<b>URL: </b><script type="text/javascript">break_line("https://www.docusign.net");</script><br />
</td>
</tr>
</table>
<!--/Info-->
<!--/Contents-->
<br/>
<br/>
</body>
<!--/Body-->
</html>
<!-- Diagnostic Information
URL:https://www.docusign.net
URL.Host:www.docusign.net
URL.Destination.IP:162.248.184.28
URL.Categories:Internet Services
URL.Reputation:0
URL.ReputationString:Minimal Risk
URL.Geolocation:US
System.HostName: webgateway.intellicorp.ds
System.UUID: 4238C800-2BBA-B00E-88AD-09E46876A786
Error.ID:0
Error.Message:
Rules.CurrentRule.ID:19417
Rules.CurrentRule.Name: Try-Authenticate: NTLM
Rules.CurrentRuleSet.Name: Explicit Proxy Authentication
Cycle.Name: Request
Cycle.TopName: Request
List.LastMatches:
URL.FileExtension:
URL.FileName:
Body.FileName:
Body.FullFileName:
Block.Reason:Authentication Required
Block.ID:0
Proxy.IP: 172.22.36.179
Proxy.Port: 9090
Client.IP:172.22.33.56
Authentication.CacheRemaingTime:4
Authentication.Failed:false
Authentication.FailureReason.Message:No credentials(4)
Authentication.IsAuthenticated:false
Authentication.IsLandingOnServer:false
Authentication.IsServerRequest:false
Authentication.Method:
Authentication.Realm:
Authentication.UserName:
Authentication.UserGroups:
Header.Request.Get(Accept):
Header.Request.Get(Accept-Encoding):
Header.Request.Get(Host):www.docusign.net:443
Header.Request.Get(Referer):
Header.Request.Get(User-Agent):
Header.Request.Get(Via):Proxy
Header.Request.Get(X-Forwarded-For):
Header.Response.Get(Content-Length):
Header.Response.Get(Content-Type):text/html
Header.Response.Get(Server):
Header.Response.Get(Via):
Header.Response.Get(X-Forwarded-For):
Application.Name:DocuSign
-->
回答1:
It seems you are behind a proxy or your firewall is not allowing to hit docusign api endpoints, because above error details is coming from McAfee, node has value McAfee Web Gateway - Notification - Authentication Required, so some authentication is required by your McAfee to allow traffic to DocuSign API endpoints. Please check with someone in your IT team to get this resolved
来源:https://stackoverflow.com/questions/46671918/docusign-legacy-header-authentication-error