When I originally wrote that post I included only snippets from a JSP page that represents an external OAM login form.
I have updated that post with a full sample login.jsp that functions as an external login form for OAM 11g. The code is also included below.
To review, to work as an external login form the login page code must do the following:
• You need to post back to the OAM server to the URI: “/oam/server/auth_cred_submit”. Note that in my sample, I’m posting to a load balancer VIP over SSL which will route the post to one of the OAM servers in my cluster.
• You need to post variables “username” and “password”
• You need code that will grab the request_id off of the query string and post it (as a hidden form variable) as well.
The Code
<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> <% String error=request.getParameter("error"); if(error==null || error=="null"){ error=""; } String paramName = "request_id"; String reqId = request.getParameter( paramName ); %> <html> <head> <title>User Login JSP</title> <script> function trim(s) { return s.replace( /^\s*/, "" ).replace( /\s*$/, "" ); } function validate() { if(trim(document.frmLogin.sUserName.value)=="") { alert("Login empty"); document.frmLogin.sUserName.focus(); return false; } else if(trim(document.frmLogin.sPwd.value)=="") { alert("password empty"); document.frmLogin.sPwd.focus(); return false; } } </script> </head> <body> <p>Acme Clinical Applications Login Screen - OAM edition</p> <p> </p> <div><%=error%></div> <form name="frmLogin" onSubmit="return validate();" action="http://authbootcamp.us.oracle.com/oam/server/auth_cred_submit" method="post"> <p> User Name<input type="text" name="username"/><br/>Password <input type="password" name="password"/> <input name="request_id" value="<%=reqId%>" type="hidden"> <br/> </p> <p> <input type="submit" name="sSubmit" value="Submit"/> </p> </form> </body> </html>