4 Replies Latest reply on Dec 24, 2005 8:38 PM by anil.saldhana

    login form on any page

    kosl

      Hi,

      I'm using jboss 4.0.3 and jaas with form based authentication. Everything is working but I would like to have possibility to have a login form on every (posibly even not secured) page. When I put the "usual" form



      Login:Has?o:Login:





      on the pages I get the error:

      HTTP Status 400 - Invalid direct reference to form login page



      Does anybody know how to solve this problem?

      Thanks in advance for any help

      Karol

        • 1. Re: login form on any page
          kosl

          sorry the form should be as code:

          
           <FORM method="POST" action="j_security_check">
          <TABLE BORDER="2"><TR><TD>Login:</TD><TD>
          <INPUT type="text" name="j_username" size="16" maxlength="24"
          /><TD>Has?o:</TD><TD><INPUT type="password" name="j_password"
          size="16" maxlength="24" /><TD>Login:</TD><TD><INPUT type="submit"
           value="OK" /></TR></TABLE></FORM>
          
          


          • 2. Re: login form on any page
            starksm64

            This is not how form authentication works. The container needs to display the form you specified as needed when accessing a secured resource.

            • 3. Re: login form on any page
              kosl

              Ok I know that it is the "usual" way. My question was how to put a form on a non-secured web page. Probably that's imposible to achieve easily but maybe someone knows how to do it ?

              Kind Regards,

              Karol Oslowski

              • 4. Re: login form on any page
                anil.saldhana

                What you are trying to do is basically have custom authentication semantics sprayed into the standard Form Authentication mechanism.

                You are better off keeping them seperate.