简体   繁体   English

我可以将在node.js中[https://github.com/jasonjoh/node-tutorial]在此处实现的Office 365 Rest Api用作Web服务吗?

[英]Can i use office 365 Rest Api implemented here [https://github.com/jasonjoh/node-tutorial] in node.js as a Web service?

As the mentioned https://github.com/jasonjoh/node-tutorial example is a web app. 如所提到的https://github.com/jasonjoh/node-tutorial示例是一个Web应用程序。 but i want to use it as a web service for example :- 但我想将其用作网络服务,例如:

i want to run this app on one machine(on server) and other apps made in(mobile apps, desktop and web app) could implemented or consume this services. 我想在一台机器上(服务器上)运行此应用程序,而其他制成的应用程序(移动应用程序,台式机和网络应用程序)可以实施或使用此服务。

once user consume it my service would return [ https://login.microsoftonline.com/common/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fauthorize&response_type=code&client_id=9892b97f-0026-4t3f-aa4f-5cb2olpdee7e] then this url will be open in user's device/machine browser, then user could enter his/her office 365 credentials and once he clicked on SignIn it should aging come in web service and then it authorize the user using access token which is stored on server in cookies and then get/read emails from user office 365 account. 一旦用户使用它,我的服务就会返回[ https://login.microsoftonline.com/common/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fauthorize&response_type=code&client_id=9892b97f-0026-4t3f-aa4f-5cb2olpdee7e ],则该网址将在用户的设备/机器浏览器中打开,然后用户可以输入他/她的office 365凭据,一旦他单击SignIn,它将进入网络服务中,然后它会使用存储在以下位置的访问令牌授权用户服务器中的Cookie,然后从用户Office 365帐户获取/阅读电子邮件。

so please suggest me is it a possible scenario ? 所以请建议我这是可能的情况吗? or if you have any alternate way to do this please let me know. 或者,如果您有其他替代方法,请告诉我。

Thanks in Advance 提前致谢

Yes, this could work. 是的,这可能有效。 You would need a web front end for the user to sign in, but you could then use the access token from a web service. 您需要用户的Web前端才能登录,但随后您可以使用Web服务中的访问令牌。 Another alternative, assuming what you mean by web service, is to run in an unattended fashion by using the client credential OAuth flow , which allows an organizational admin to grant access to all mailboxes. 假定您对Web服务的含义是另一种选择,那就是使用客户端凭据OAuth流以无人照管的方式运行,该允许组织管理员授予对所有邮箱的访问权限。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 node.js中的核心模块如何工作? (https://github.com/nodejs/node/blob/master/lib) - How do the core modules in node.js work? (https://github.com/nodejs/node/blob/master/lib) I have installed a node based API from https://github.com/opentok/interactive-broadcast-api, but how to enable HTTPS on this API? - I have installed a node based API from https://github.com/opentok/interactive-broadcast-api, but how to enable HTTPS on this API? 如何解析从node.js中的Office 365 rest api获取的访问令牌? - how to parse access token recived from office 365 rest api in node.js? 如何仅在node.js中的https上执行Web服务/应用程序 - How can I perform the web service/application only on https in node.js 如何使用Office 365 Rest API获取电子邮件附件的ContentBytes属性? 我正在使用node.js,下面是我正在使用的代码 - How to get ContentBytes property of an email attachment using office 365 rest api? I am using node.js below is the code which i am using 如何存储 Node.js REST API 的状态? - How can I store the state of Node.js REST API? 如果 https 服务器是一个单独的 node.js 应用程序,我如何在 node.js 中使用 wss? - how can i use wss in node.js, if the https server is a separate node.js application? 我如何在 node.js 中使用多个参数 rest api - how can i use muliple parameter rest api in node.js Node.js使用请求模块测试https REST API - Node.js Testing https REST API with request module 如何在浏览器中使用“https://github.com/ovvn/dom-to-pdf” - How can I use `https://github.com/ovvn/dom-to-pdf` in a Browser
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM