Login.jsp revision 2d2641b497195ad2f6c5de44ab00a4d3882b65e8
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<%--
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster opensso/legal/CDDLv1.0.txt
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster at opensso/legal/CDDLv1.0.txt.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $Id: Login.jsp,v 1.9 2010/02/02 05:32:13 bina Exp $
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster--%>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<%--
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Portions Copyrighted 2012-2014 ForgeRock AS
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster--%>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<html xmlns="http://www.w3.org/1999/xhtml">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <%@page info="Login" language="java"%>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <%@taglib uri="/WEB-INF/jato.tld" prefix="jato"%>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <%@taglib uri="/WEB-INF/auth.tld" prefix="auth"%>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <jato:useViewBean className="com.sun.identity.authentication.distUI.LoginViewBean">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <%@ page contentType="text/html" %>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <%@ page import = "org.owasp.esapi.ESAPI" %>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <head>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <title><jato:text name="htmlTitle_Login" /></title>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <%
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String ServiceURI = (String) viewBean.getDisplayFieldValue(viewBean.SERVICE_URI);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String encoded = "false";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String gotoURL = (String) viewBean.getValidatedInputURL(
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster request.getParameter("goto"), request.getParameter("encoded"), request);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String gotoOnFailURL = (String) viewBean.getValidatedInputURL(
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster request.getParameter("gotoOnFail"), request.getParameter("encoded"), request);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String encodedQueryParams = (String) viewBean.getEncodedQueryParams(request);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (((gotoURL != null) && (gotoURL.length() != 0)) ||
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ((gotoOnFailURL != null) && (gotoOnFailURL.length() != 0))) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster encoded = "true";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster }
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster %>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <link href="<%= ServiceURI%>/css/new_style.css" rel="stylesheet" type="text/css" />
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <!--[if IE 9]> <link href="<%= ServiceURI%>/css/ie9.css" rel="stylesheet" type="text/css"> <![endif]-->
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <!--[if lte IE 7]> <link href="<%= ServiceURI%>/css/ie7.css" rel="stylesheet" type="text/css"> <![endif]-->
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <script language="JavaScript" src="<%= ServiceURI%>/js/auth.js" type="text/javascript"></script>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <jato:content name="validContent">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <script language="JavaScript" type="text/javascript">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <!--
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster var defaultBtn = 'Submit';
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster var elmCount = 0;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * submit form with given button value
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param value of button
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster function LoginSubmit(value) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster aggSubmit();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster var hiddenFrm = document.forms['Login'];
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (hiddenFrm != null) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster hiddenFrm.elements['IDButton'].value = value;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster hiddenFrm.submit();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster }
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster }
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -->
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster </script>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster </jato:content>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster </head>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <body onload="placeCursorOnFirstElm();">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <div class="container_12">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <div class="grid_4 suffix_8">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <a class="logo" href="<%= ServiceURI%>"></a>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster </div>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <div class="box clear-float">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <div class="grid_3">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <div class="product-logo"></div>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster </div>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <div class="grid_9 left-seperator">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <div class="box-content clear-float">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <jato:content name="ContentStaticTextHeader">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <h1><jato:getDisplayFieldValue name='StaticTextHeader' defaultValue='Authentication' fireDisplayEvents='true' escape='false'/></h1>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster </jato:content>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <jato:content name="validContent">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <auth:form name="Login" method="post" defaultCommandChild="DefaultLoginURL">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <jato:tiledView name="tiledCallbacks"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster type="com.sun.identity.authentication.UI.CallBackTiledView">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <script language="javascript" type="text/javascript">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster <!--
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster elmCount++;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -->
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster </script>
<jato:content name="textOut">
<script language="javascript" type="text/javascript">
<!--
<jato:text name="scriptContent" defaultValue="" escape="false"/>
-->
</script>
<div class="TextOutputCallback_<jato:text name="messageType" />"><jato:text name="textContent" defaultValue="" escape="false" /></div>
</jato:content>
<jato:content name="textBox">
<div class="row">
<label for="IDToken<jato:text name="txtIndex" />">
<jato:text name="txtPrompt" defaultValue="User name:" escape="false" />
<jato:content name="isRequired">
<img src="<%= ServiceURI %>/images/required.gif" alt="Required Field"
title="Required Field" width="7" height="14" />
</jato:content>
</label>
<input class="textbox" type="text" name="IDToken<jato:text name="txtIndex" />" id="IDToken<jato:text name="txtIndex" />" value="<jato:text name="txtValue" />" />
</div>
</jato:content>
<jato:content name="password">
<div class="row">
<label for="IDToken<jato:text name="txtIndex" />">
<jato:text name="txtPrompt" defaultValue="Password:" escape="false" />
<jato:content name="isRequired">
<img src="<%= ServiceURI %>/images/required.gif" alt="Required Field"
title="Required Field" width="7" height="14" />
</jato:content>
</label>
<input class="textbox" type="password" name="IDToken<jato:text name="txtIndex" />" id="IDToken<jato:text name="txtIndex" />" value="" />
</div>
</jato:content>
<jato:content name="choice">
<div class="row">
<label for="IDToken<jato:text name="txtIndex" />">
<jato:text name="txtPrompt" defaultValue="RadioButton:" escape="false" />
<jato:content name="isRequired">
<img src="<%= ServiceURI %>/images/required.gif" alt="Required Field"
title="Required Field" width="7" height="14" />
</jato:content>
</label>
<div class="radios">
<jato:tiledView name="tiledChoices" type="com.sun.identity.authentication.UI.CallBackChoiceTiledView">
<jato:content name="selectedChoice">
<input type="radio" name="IDToken<jato:text name="txtParentIndex" />" id="IDToken<jato:text name="txtIndex" />" value="<jato:text name="txtIndex" />" checked="checked" />
<label for="IDToken<jato:text name="txtIndex" />">
<jato:text name="txtChoice" />
</label>
</jato:content>
<jato:content name="unselectedChoice">
<input type="radio" name="IDToken<jato:text name="txtParentIndex" />" id="IDToken<jato:text name="txtIndex" />" value="<jato:text name="txtIndex" />" />
<label for="IDToken<jato:text name="txtIndex" />">
<jato:text name="txtChoice" />
</label>
</jato:content>
</jato:tiledView>
</div>
</div>
</jato:content>
</jato:tiledView>
<jato:content name="ContentStaticTextResult">
<!-- after login output message -->
<p><b><jato:getDisplayFieldValue name='StaticTextResult'
defaultValue='' fireDisplayEvents='true' escape='false'/></b></p>
</jato:content>
<jato:content name="ContentHref">
<!-- URL back to Login page -->
<p><auth:href name="LoginURL" fireDisplayEvents='true'>
<jato:text name="txtGotoLoginAfterFail" /></auth:href></p>
</jato:content>
<jato:content name="ContentImage">
<!-- customized image defined in properties file -->
<p><img name="IDImage"
src="<jato:getDisplayFieldValue name='Image'/>" alt=""></p>
</jato:content>
<jato:content name="ContentButtonLogin">
<fieldset>
<jato:content name="hasButton">
<div class="row">
<jato:tiledView name="tiledButtons"
type="com.sun.identity.authentication.UI.ButtonTiledView">
<input name="Login.Submit" type="button" onclick="LoginSubmit('<jato:text name="txtButton" />'); return false;" class="button" value="<jato:text name="txtButton" />" />
</jato:tiledView>
</div>
<script language="javascript" type="text/javascript">
<!--
defaultBtn = '<jato:text name="defaultBtn" />';
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i ++) {
if (inputs[i].type == 'button' && inputs[i].value == defaultBtn) {
inputs[i].setAttribute("class", "button primary");;
break;
}
}
-->
</script>
</jato:content>
<jato:content name="hasNoButton">
<div class="row">
<input name="Login.Submit" type="submit" onclick="LoginSubmit('<jato:text name="lblSubmit" />'); return false;" class="button primary" value="<jato:text name="lblSubmit" />" />
</div>
</jato:content>
</fieldset>
</jato:content>
<script language="javascript" type="text/javascript">
<!--
if (elmCount != null) {
document.write("<input name=\"IDButton" + "\" type=\"hidden\">");
}
-->
</script>
<input type="hidden" name="goto" value="<%= ESAPI.encoder().encodeForHTMLAttribute(gotoURL)%>" />
<input type="hidden" name="gotoOnFail" value="<%= ESAPI.encoder().encodeForHTMLAttribute(gotoOnFailURL)%>"/>
<input type="hidden" name="SunQueryParamsString" value="<%= encodedQueryParams%>" />
<input type="hidden" name="encoded" value="<%= encoded%>" />
</auth:form>
</jato:content>
</div>
</div>
</div>
<div class="footer alt-color">
<div class="grid_6 suffix_3">
<p><auth:resBundle bundleName="amAuthUI" resourceKey="copyright.notice" /></p>
</div>
</div>
</div>
</body>
</jato:useViewBean>
</html>