Autologin via POST

  1. 13 years ago

    Hi.

    I would very much like to be able to log users into FOP2 automatically. Now i have tried and successfully used the method involving GET parameters, but i would really like to hide the username and password from the URL and do the login through a form POST instead. I did try submitting the login credentials through a post, with no luck.

  2. admin

    7 Sep 2011 Administrator

    Thanks for the feedback.

    I will investigate if possible, and if its possible will include it on the next release.

  3. admin

    8 Sep 2011 Administrator

    Unfortunately it will not be possible to use POST for auto login, but I can implement the usage of window.name to pass information between a login form and the fop2 app itself, so you will not be seeing sensitive information on the url, but you will also need to set the window.name accordingly instead of using a simple post form.

  4. Hi.

    Any method that will remove the login credentials from the URL will be super :-)

    An alternative solution could be to make it possible to do the password check manually in the perl module, that way i could use the password field as a session hash and handle the session setup and expiry in my backend.

  5. admin

    14 Sep 2011 Administrator

    Hi,

    Your suggestion seems utterly complicated to implement. I have tested the window.name and works perfectly well, I have already implemented it on 'trunk'... you will see the feature in the next release. The login form should set the window.name on submit, here is a silly sample:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>test</title>
    <script>
    function setLogin(value){
        window.name=value;
        window.location='index.html';
    }
    </script>  
    </head>
    
    <body>
    <form id="form1" name="form1" method="post" action="">
      <select name="select" onchange="setLogin(this.value)">
         <option>seleccionar</option>
        <option value="&exten=100&pass=qwop">Login with 100</option>
        <option value="&exten=101&pass=qwop">Login with 101</option>
      </select>
    </form>
    </body>
    </html>
  6. Thank you, i am looking forward to the next release then :-)

or Sign Up to reply!