drb88830 2013-11-16 16:00
浏览 144

从我的主站点登录时,我想在另一个页面上自动登录Redmine

I have main PHP website and a Redmine app. When a user logged in to my website, new tab will pop-up and open the Redmine and login using the username and password that the user entered on the main website. Or if it is not possible to auto login from my main website to Redmine, is it possible to just have a default value on the username field and password field from the ones that the user also inputted on the main website?

I'm still noob on configuring Redmine and Ruby on Rails, so please bear with me :(

Edit: The main website and the Redmine website will be a system for our group only so I think security will not be a major issue. Also they won't be going online and will be operating through the intranet only.

  • 写回答

1条回答 默认 最新

  • douke6424 2013-11-16 17:45
    关注

    You asked:

    is it possible to modify redmine login page? To have it get variables on url? So I can just open a new window like this: redmine/login?user=user&pass=pass.

    Hopefully not. If Redmine is built well (and I'd be reasonably sure it is) then it will only accept user credentials in a post operation, so as to avoid passwords being recorded via the URL in browsers, proxy servers and web servers. It would be poor security practice to attempt to log on this way, or for Redmine to permit you to do so.

    One of the approaches I was suggesting in my earlier comment was for your PHP application to become a proxy for Redmine operations. There's two sub-categories here:

    • Use a programmatic browser component to carry out form operations in Redmine by visiting pages, clicking buttons, submitting forms etc. This is the "screen scraper" approach, but can be quite reliable since presumably Redmine does not change its HTML layout very often. Thus, the cookies you would normally have in your browser would be stored on the server instead.
    • Use an API built into Redmine. I guess there's not one as standard, but I found this one. I've not used it, so you'd need to test its suitability.

    In either approach, you would not use Redmine directly at all: you would build the Redmine features you need into your PHP application, using forms to accept relevant user input, and rendering to the screen the output your server has received from Redmine.

    This would work, but bear in mind that it's not a trivial project, either in terms of its size or complexity. If you are after a simpler alternative, then the browser password store is an option, but it won't log users on automatically, nor automatically discover the username you are logged on as in your PHP application.

    评论

报告相同问题?

悬赏问题

  • ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
  • ¥15 安装quartus II18.1时弹出此error,怎么解决?
  • ¥15 keil官网下载psn序列号在哪
  • ¥15 想用adb命令做一个通话软件,播放录音
  • ¥30 Pytorch深度学习服务器跑不通问题解决?
  • ¥15 部分客户订单定位有误的问题
  • ¥15 如何在maya程序中利用python编写领子和褶裥的模型的方法
  • ¥15 Bug traq 数据包 大概什么价
  • ¥15 在anaconda上pytorch和paddle paddle下载报错
  • ¥25 自动填写QQ腾讯文档收集表