邮件应用程序:如何从STS获取令牌 [英] Mail App : How to Get Token From STS

查看:111
本文介绍了邮件应用程序:如何从STS获取令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨大家好,


我们正在尝试创建一个Outlook邮件应用程序,它将查询由被动身份验证保护的Web Api服务/ REST。 (STS)


现在问题是,这种情况一般是如何实现的?


如何从STS获取令牌并将其传递到Web服务调用的授权标头中?或者有没有不同的方法来实现这个目标?


任何指针都会非常有用。


提前致谢。




Bhushan | http://www.passionatetechie.blogspot.com | http://twitter.com/BhushanGawale

解决方案

使用jQuery,您可以设置请求标头,如


< pre class ="prettyprint">


.ajax({
url:" / test",
headers:{" X-Test-Header": " test-value"}
});

并且读取标题

 


.ajax({
url:'url.do',
complete:function(resp){
alert(resp.getAllResponseHeaders());
}
});


Hi Guys,

We are trying to create a Outlook Mail App , it will be querying to the Web Api services /REST which are secured by Passive Authentication. (STS)

Now the question is , how this scenario is generally achieved?

How can I get the token from STS and pass it in the authorization header of web service call? or is there any different way to achieve this?

Any pointers will be really helpful.

Thanks in advance.


Bhushan | http://www.passionatetechie.blogspot.com | http://twitter.com/BhushanGawale

解决方案

With jQuery you can set request headers like


.ajax({ url: "/test", headers: {"X-Test-Header": "test-value"} });

And to read headers


.ajax({ url:'url.do', complete: function(resp){ alert(resp.getAllResponseHeaders()); } });


这篇关于邮件应用程序:如何从STS获取令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆