Autologin via POST

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.

Comments

  • Thanks for the feedback.

    I will investigate if possible, and if its possible will include it on the next release.
  • 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.
  • 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.
  • 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>
    
  • Thank you, i am looking forward to the next release then :-)
Sign In or Register to comment.