邮件应用程序:如何从STS获取令牌 [英] Mail App : How to Get Token From 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屋!