Configuring Anonymous-Enrollment Or Self-Registration By User



Changes / additions are highlighted below.



File: opensso/config/auth/default/Login.jsp

<snip>


<%

String ServiceURI = (String) viewBean.getDisplayFieldValue(viewBean.SERVICE_URI);

String encoded = "false";

String gotoURL = (String) viewBean.getValidatedInputURL(

request.getParameter("goto"), request.getParameter("encoded"), request);

String encodedQueryParams = (String) viewBean.getEncodedQueryParams(request);

if ((gotoURL != null) && (gotoURL.length() != 0)) {

encoded = "true";

}

String replaygotoURL = "";

String goToURL = request.getParameter("goto");

if(gotoURL != null && !gotoURL.equals("null") && (gotoURL.length() > 0)){

replaygotoURL = "&goto=" + goToURL;

}

System.out.println("replaygotoURL: " + replaygotoURL);

%>


<link rel="stylesheet" href="<%= ServiceURI %>/css/styles.css" type="text/css" />

<script language="JavaScript" src="<%= ServiceURI %>/js/browserVersion.js"></script>

<script language="JavaScript" src="<%= ServiceURI %>/js/auth.js"></script>


<snip>


function LoginSubmit(value) {

aggSubmit();

var hiddenFrm = document.forms['Login'];


if (hiddenFrm != null) {

hiddenFrm.elements['IDButton'].value = value;

if (this.submitted) {

alert("The request is currently being processed");

}

else {

this.submitted = true;

hiddenFrm.submit();

}

}

}


function RegisterUser() {

window.location = "http://am-v490-01.red.iplanet.com:6480/idm/authutil/anonEnrollment.jsp?id=endUserAnonymousEnrollment<%=replaygotoURL%>";

}


<snip>


<jato:content name="hasNoButton">

<tr>

<td><img src="<%= ServiceURI %>/images/dot.gif"

width="1" height="15" alt="" /></td>

<td>

<table border=0 cellpadding=0 cellspacing=0>

<script language="javascript">

markupButton(

'<jato:text name="lblSubmit" />',

"javascript:LoginSubmit('<jato:text name="lblSubmit" />')");

</script>

<script language="javascript">

markupButton(

'Register User',

"javascript:RegisterUser()");

</script>

</table>

</td>

</tr>

<!-- end of hasNoButton -->

</jato:content>


<snip>


<input type="hidden" name="goto" value="<%= gotoURL %>">

<input type="hidden" name="SunQueryParamsString" value="<%= encodedQueryParams %>">

<input type="hidden" name="encoded" value="<%= encoded %>">

<input type="hidden" name="plaingoto" value="<%= request.getParameter("goto") %>">

</auth:form>

</jato:content>


<snip>