dozxos6346 2014-05-07 19:58
浏览 82
已采纳

我可以在登录后从一个https服务器重定向用户到Laravel中的另一个服务器

When a user logs in (using Laravel), can I redirect them from HTTPS one server to another HTTPS server? If so, how can I accomplish this using "plain" PHP without SSO or LDAP?

In my specific situation, I have two servers:

  1. Running Ubuntu with SSL, Apache, MySQL, and a Laravel DB where users will log in and
  2. Same setup as as #1 but without a database

let me rephrase that: WILL THAT BE SECURITY ISSUE ?? and how will i know that user is loged in on 1site?

  • 写回答

3条回答 默认 最新

  • doutao1282 2014-05-07 20:18
    关注

    In order to achieve what you want then the following flow, probably modified, could work:

    1. Log into site1
    2. Upon successful login site1 cURLs site2 using HTTPS with predefined credentials to a RESTful interface
    3. Site2 checks the predefined credentials and creates a temporary id which is stored in the DB and responds to the cURL with the ID stored in the DB
      • ^ run a cron job every minute to clear ID's older than 5 seconds
    4. Site1 puts the ID in the URL and redirects to Site2
    5. Site2 gets the ID from the DB and authenticates the user
    6. Site2 deletes DB entry upon authentication
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题