2 Replies Latest reply on Jul 11, 2007 7:23 AM by bvogt

    how to skip login.jsp when using ldap

    ian.ouzounov

      Hi all,
      what is the way to skip the step with login.jsp?
      here is what I want to achieve:
      I'm using LDAP Authentication for my portal.
      I want to trigger the authentication every time a user enter the portal, but I want to keep it in the background, without showing through login.
      eventually I will remove the login link too.

      Any suggestions?
      thx

        • 1. Re: how to skip login.jsp when using ldap
          ian.ouzounov

          to the above scenario I should add that,
          I'm getting the username from the servlet request header
          don't care for password, since the user has been authenticated before entering the portal.
          thx

          • 2. Re: how to skip login.jsp when using ldap
            bvogt

            for portal 2.4 we needed the same...

            One solution could be modifying: core/src/resources/portal-server-war/login.jsp

            like:

            <%
             final String userIDHeaderAttribute = "userID";
             String userIDHeaderValue = request.getHeader(userIDHeaderAttribute);
            
             if ((userIDHeaderValue != null) && (userIDHeaderValue.length() > 0))
             {
            %>
            <body OnLoad="document.loginform.submit();">
             <B>Logging in...</B>
             <form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm" target="_top">
             <input type="hidden" name="j_username" value="<%= userIDHeaderValue %>"/>
             <input type="hidden" name="j_password" value=""/>
             </form>
            </body>
            <%
             }
             else
             {
            


            and rebuild the portal.sar afterwards