私は別のドメインのアプリケーションにログインしています。後続のXmlHttpRequestごとにそのドメインを作成して、Windows認証の認証情報を送信したいので、別のドメインにリクエストすると再びログインするように求められません同じドメイン上のサービスです。XmlHttpRequestでWindowsログオン認証情報を送信することは可能ですか?
XmlHttpRequestヘッダーでWindows認証資格情報を送信することはできますか?
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open("GET", requestUrl, true);
xmlhttp.setRequestHeader("Content-Type", "application/json");
xmlhttp.setRequestHeader("Accept", "application/json");
//Is it possible to send the Windows Authentication creds in the header of this request?
xmlhttp.setRequestHeader("?????", "?????");
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4)
{
callback(__parseJson(xmlhttp.responseText));
}
}
xmlhttp.send(null);
必ずHTTPSを使用してください。 – Francisc
@Francisc - なぜですか?これはWindows認証で、暗号化機能を内蔵しており、おそらくLAN環境でのみ使用されています。 – Quentin
@Quentin、両方のカウントで正しく – KodeKreachor