OAuthPwd.jsp revision ed859f4f767267b935e795701cba52b8e3ccddfd
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync Copyright (c) 2011-2013 ForgeRock AS. All rights reserved.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync The contents of this file are subject to the terms
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync of the Common Development and Distribution License
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync (the License). You may not use this file except in
<%@ page import="org.owasp.esapi.ESAPI" %>
<%@ page import="com.iplanet.am.util.SystemProperties" %>
<%@ page import="com.sun.identity.shared.Constants" %>
<%@ page import="static org.forgerock.openam.authentication.modules.oauth2.OAuthParam.*" %>
<%@ page import="java.util.ResourceBundle" %>
<%@ page import="java.util.MissingResourceException" %>
<%@ page import="java.util.Locale" %>
<%@ page import="org.forgerock.openam.authentication.modules.oauth2.OAuthUtil" %>
<%@ page import="org.owasp.esapi.ESAPI" %>
String termsAndConditionsPage = ServiceURI + "/tc.html";
String lang = request.getParameter("lang");
if (lang != null && lang.length() != 0) {
locale = request.getLocale();
resources = ResourceBundle.getBundle("amAuthOAuth", locale);
OAuthUtil.debugMessage("OAuthPwd: obtained resource bundle with locale " + locale);
OAuthUtil.debugError("OAuthPwd: Resource Bundle not found", mr);
resources = ResourceBundle.getBundle("amAuthOAuth");
String logoutURL = request.getParameter(PARAM_GOTO);
boolean isValidURL = ESAPI.validator().
OAuthUtil.debugError("OAuthPwd: wrong logoutURL URL attempted to be used "
String emptyField = ESAPI.encoder().encodeForHTML("");
String passwordSetMsg = resources.getString("passwordSetMsg");
String newPassLabel = resources.getString("newPassLabel");
String token1 = ESAPI.encoder().encodeForHTML(PARAM_TOKEN1);
String token2 = ESAPI.encoder().encodeForHTML(PARAM_TOKEN2);
String confirmPassLabel = resources.getString("confirmPassLabel");
String terms = ESAPI.encoder().encodeForHTML("terms");
String termsAndCondsLabel = resources.getString("termsAndCondsLabel");
String settingForm = ESAPI.encoder().encodeForHTML("settingForm");
String button1 = ESAPI.encoder().encodeForHTML("button1");
String accept = ESAPI.encoder().encodeForHTML("accept");
String outputField = ESAPI.encoder().encodeForHTML("output");
String passwordRules = resources.getString("passwordRules");
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="JavaScript" src="<%= ServiceURI %>/js/auth.js"></script>
<script type="text/javascript" language="JavaScript">
var out = document.getElementById("msgcnt");
out.innerHTML = "";
if (form.elements[token1].value != '') {
out.innerHTML = "<%= errLength %>";
form.elements[token1].focus();
out.innerHTML = "<%= errNumbers %>";
form.elements[token1].focus();
form.elements[token1].focus();
out.innerHTML = "<%= errUppercase %>";
form.elements[token1].focus();
out.innerHTML = "<%= errInvalidPass %>";
form.elements[token1].focus();
out.innerHTML = "<%= errNoMatch %>";
form.elements[token1].focus();
out.innerHTML = "<%= emptyField %>";
form.elements[token1].focus();
out.innerHTML = "<%= errEmptyPass %>";
var out = document.getElementById("msgcnt");
out.innerHTML = '';
if (form.elements[terms].checked == true) {
form.elements[terms].focus();
out.innerHTML = "<%= errTandC %>";
if (form.elements[Login].value == '<%= cancelValue %>') {
window.location = "<%= logoutURL %>";
popupWindow = window.open(
var wdw = document.getElementById(att);
if (wdw.style.display == "none") {
wdw.style.display = "block";
wdw.style.display = "none";
var wdw = document.getElementById(att);
wdw.style.display = "none";
<p class="message"><a href="javascript:toggleWdw('rules');"><span class="icon info"></a></span><span