0

我不确定标题是否正确,但根据我目前对我想要达到的目标的理解,这是我可以使用的最接近的术语。但我包含了一张图片,以便我更容易解释它。

提议的架构

基本上,我试图根据应用程序的功能来划分应用程序,第一个是红色,它将作为具有主页或主页的登录页面,具有多种功能:

  • 检查用户身份验证(用户和通行证)
  • 成功登录后,应用程序将检查用户访问级别是否将他重定向到事务模块(子应用程序的集合)或文件维护。

我已经提出了所有的应用程序,但目前它是“一个应用程序”,所以我的主要问题是:

  1. 当我被重定向时,如何在 RED 登录到 BLUE 或 YELLOW 后延长我的会话。
  2. 以及如何将控制器从 RED 重定向或调用到 BLUE 或 YELLOW?或者,如果我不是通过控制器从一个应用程序调用到另一个应用程序,而是使用 url,它是如何调用或调用什么的?
  3. 流程只能从 RED 到 BLUE,RED 到 YELLOW,但不能从 BLUE 到 YELLOW。

注意:所有 3 个应用程序都是分开的

提前致谢

*添加:例如,到目前为止,我只记得在stackoverflow中注册过一次,但是当我在stackoverflow相关站点中单击“服务器故障”、“数据库管理员”等时,他们仍然保留我的会话而无需我重新-记录。

或者登录gmail时,我可以直接去youtube,现在我也登录了youtube?这就是我想在这个问题中实现的目标。

4

2 回答 2

1

If a user is logged in - then with every click - you have to confirm the credentials. Thats either with a cookie session or a token (url or form field) or in the http header. After you have confirmed the user - then you let them in to your class and methods.

If you have to redirect then you set the cookie session - and then redirect. The controller you redirect to will be able to read the session cookie. But usually you are going to redirect to kick someone out because their credential did not pass.

Try and set up your diagrams based on the type of user and what they can do - User, Admin, Owner are types of users. And then - what are the users acting on. Some Users maybe able to create something and update but not delete. So if define the roles, you immediately separate out the security concerns.

Each role gets at least one controller - so all the methods in the class have the same level of validation. You are not mixing methods for simple users Versus methods for a super admin. Let the needs of the specific user define what methods are in the class.

==== edit

oh now you mention single sign on? :-) This might be of interest: Codeigniter oauth 2 https://github.com/philsturgeon/codeigniter-oauth2

handles: Facebook, Foursquare, GitHub, Google, PayPal, Instagram, Soundcloud, Windows Live, YouTube

于 2013-09-06T04:44:18.680 回答
0

我找到了正确的术语。它是单点登录。目前只是四处寻找教程,到目前为止,我正在阅读以下内容:

http://thinkmoult.com/use-codeigniter-openid-library-to-integrate-openid/

于 2013-09-06T11:58:06.867 回答