使用回调令牌的PHP EWS [英] PHP EWS using Callback Token

查看:105
本文介绍了使用回调令牌的PHP EWS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人使用EWS回调令牌(而不是用户名/密码)对来自PHP的EWS SOAP请求进行身份验证吗?我一直在查看在Google上搜索此项目时出现的 PHP-EWS 项目,但是据我所知,它仅支持用户名/密码验证.

Has anyone had any luck authenticating for a EWS SOAP request from PHP using the EWS Callback token instead of a username / password? I have been looking at the PHP-EWS project that comes up when you search for this on google but it only supports username / password authentication as far as I can tell.

这里是一个有关如何做我想做的事的例子,但它使用的是C#而不是PHP,我不知道如何将正在发生的事情转换为可以在PHP中使用的东西. http://msdn.microsoft.com/en-us/library/dn148008(v = office.15)

Here is an example on how to do what I want to do, but it uses C# not PHP and I can't figure out how to translate what's going on here into something I can use in PHP. http://msdn.microsoft.com/en-us/library/dn148008(v=office.15)

我正在使用Outlook Mail应用程序,该应用程序将允许我的用户将他们正在查看的当前电子邮件保存到链接到特定客户端的我们的数据库中.我实际上是在重建旧的Outlook加载项,该加载项最初是几年前使用VB.net构建的.用于Outlook加载项的新体系结构允许您构建在桌面,移动和OWA上的Outlook中运行的应用程序.不幸的是,新架构不允许在应用程序本身中直接访问邮件项目.相反,您应该在应用程序中使用getCallbackTokenAsync方法来获取令牌,并将其与EWS url和Item ID一起传递到基于Web的后端,以便后端可以直接向Exchange服务器发出SOAP请求以从中获取属性.邮件项目,例如附件.

I'm working on an Outlook Mail app that will allow my users to save the current email they are viewing to our database linked to a specific client. I am actually rebuilding an old Outlook Add-in that was originally built using VB.net a few years ago. The new architecture to use for Outlook Add-ins allows you to build apps that run in Outlook on desktop, mobile, and OWA. Unfortunately the new architecture doesn't allow as much direct access to the mail items within the application itself. Instead, you are supposed to use the getCallbackTokenAsync method in the app to get a token that you pass along with a EWS url and Item ID to your web based backend so the backend can make a SOAP request directly to the Exchange server to get properties from a mail item such as attachments.

推荐答案

我们没有PHP示例,但是要发出适当的请求,请首先构造请求的主体(SOAP EWS请求本身),然后进行设置授权标头为"bearer",并在其后放置令牌.看起来应该像这样:授权:承载abcdef1234 ... =="

We don't have a PHP example, but to make a proper request, first construct the body of the request (the SOAP EWS request itself), then set the authorization header to be "bearer" and put the token right after. It should look like this over the wire "Authorization: Bearer abcdef1234...=="

您遇到的确切问题是什么?您可以共享编写的用于构建Web请求的代码吗?

What is the exact problem you are having? Can you share the code you wrote to construct the web request?

此外,我们在这里有一个专门用于办公应用程序的论坛:

Also, we have a dedicated forum for apps for office here: http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=appsforoffice

这篇关于使用回调令牌的PHP EWS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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