使用自定义标题添加SAML响应

时间:2019-11-20 12:01:11

标签: c# asp.net ajax asp.net-mvc-4 saml

我们已经为SSO请求创建了SAML令牌,并且尝试通过标头附加相同的SAML响应,并使用JQUERY ajax将其发送到另一个URL,但是我们无法添加标头。

我们使用JQUERY在我们的应用程序中尝试过的PFB代码。

$.ajax({
            type: "POST",
            url: "External Url",
            crossDomain:true,
            beforeSend:function(xhr){
            xhr.setRequestHeader("SAML",token);
            },
/* tried the below commented line to add the samlresponse in header */
            //headers:{
             // Access-Control-Allow-Origin:'*',
              //'SAML':token
           // },
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (msg) {
            window.close()},
            failure: function (msg) {
            alert('Failure');},
        });

您能帮我解决这个问题吗?

0 个答案:

没有答案
相关问题