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 关于#lua#的问题,请各位专家解答!
  • ¥15 什么设备可以研究OFDM的60GHz毫米波信道模型
  • ¥15 不知道是该怎么引用多个函数片段
  • ¥15 爬取1-112页所有帖子的标题但是12页后要登录后才能 我使用selenium模拟登录 账号密码输入后 会报错 不知道怎么弄了
  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥50 vue组件中无法正确接收并处理axios请求
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决
  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline