drb88830 2013-11-16 16:00 采纳率: 0%
浏览 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.

    评论

报告相同问题?