从哪里开始集成两个 zend 应用程序
我想集成两个基于 Zend Framework 的 Web 应用程序(共享用户)。你会从哪里开始?
I would like to integrate two web application (share users) both based on Zend Framework. Where would you start?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
识别每个应用程序中所有可能的 URL
编写一个小型路由应用程序
让您的小型路由应用程序识别哪些URL 属于每个应用程序,然后在手动设置应用程序的
.htaccess
通常发送的环境后,手动“包含”每个应用程序的index.php
文件 p>(此外,Magento 使用 Zend Framework 的组件,但它不是 Zend Framework 应用程序)
Identify all the possible URLs in each application
Write a small routing application
Have your small routing application identify which URL belongs to each application, and then manually "include" the
index.php
file for each application after manually setting up the environment that the application's.htaccess
would normally send(also, Magento uses components of the Zend Framework, but it's not a Zend Framework application)
如果您需要做的只是共享用户,那么每当您执行常规身份验证机制时,您只需要让每个 Web 应用程序将用户相互映射 - 如果您登录到 WebAppA,那么每当 WebAppB 检查凭据时,它都应该查看是否您已登录到 WebAppB,这应该是现有功能,但是如果您没有登录到 WebAppB,请检查您是否已登录到 WebAppA...
如果用户名排队,则根据身份验证方案,这将是简单到中等难度,否则只需提示用户一次对他们的其他帐户进行身份验证,并在身份验证成功后存储映射。
If all you need to do is share users, you just need to have each web application map users to one another whenever you do your regular authentication mechanism -- if you log in to WebAppA, then whenever WebAppB checks credentials it should look to see if you're logged into WebAppB, which should be existing functionality, but then if you're not logged into WebAppB, check if you are logged into WebAppA...
If usernames line up, this is easy to medium difficulty depending on the authentication schemes, otherwise just prompt the user once to authenticate to their other account and store the mapping on a successful authentication.