encode.jsp revision e8721886dbfd32e88cc7077cbee4b6bb1b44b443
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650takashi DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
a78048ccbdb6256da15e6b0e7e95355e480c2301nd The contents of this file are subject to the terms
5e740829c3448285963d3882530669f0112cf690gryzor of the Common Development and Distribution License
5e740829c3448285963d3882530669f0112cf690gryzor (the License). You may not use this file except in
5e740829c3448285963d3882530669f0112cf690gryzor compliance with the License.
a78048ccbdb6256da15e6b0e7e95355e480c2301nd You can obtain a copy of the License at
d23070a273525fb69f21f5426d31a32157dad337nilgun See the License for the specific language governing
d23070a273525fb69f21f5426d31a32157dad337nilgun permission and limitations under the License.
d23070a273525fb69f21f5426d31a32157dad337nilgun When distributing Covered Code, include this CDDL
$Id: encode.jsp,v 1.13 2008/12/05 17:53:39 veiming Exp $
<%@page contentType="text/html; charset=UTF-8" %>
<%@page import="com.iplanet.sso.SSOException" %>
<%@page import="com.iplanet.sso.SSOToken" %>
<%@page import="com.iplanet.sso.SSOTokenManager" %>
<%@page import="com.sun.identity.security.EncodeAction" %>
<%@page import="com.sun.identity.shared.locale.Locale" %>
<%@page import="com.sun.identity.sm.SMSEntry" %>
<%@page import="java.security.AccessController" %>
<%@page import="java.util.ResourceBundle" %>
<div class="SkpMedGry1"><a href="#SkipAnchor3860"><img src="com_sun_web_ui/images/other/dot.gif" alt="Jump to End of Masthead" border="0" height="1" width="1" /></a></div><div class="MstDiv">
<div class="MstDivTtl"><img name="AMConfig.configurator.ProdName" src="console/images/PrimaryProductName.png" alt="OpenAM" border="0" /></div>
<td class="MstTdLogo" width="1%"><img name="AMConfig.configurator.BrandLogo" src="com_sun_web_ui/images/other/javalogo.gif" alt="Java(TM) Logo" border="0" height="55" width="31" /></td>
<table class="MstTblEnd" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><img name="RMRealm.mhCommon.EndorserLogo" src="com_sun_web_ui/images/masthead/masthead-sunname.gif" alt="Sun(TM) Microsystems, Inc." align="right" border="0" height="10" width="108" /></td></tr></table>
<table class="SkpMedGry1" border="0" cellpadding="5" cellspacing="0" width="100%"><tr><td><img src="com_sun_web_ui/images/other/dot.gif" alt="Jump to End of Masthead" border="0" height="1" width="1" /></a></td></tr></table>
request.setCharacterEncoding("UTF-8");
SSOTokenManager manager = SSOTokenManager.getInstance();
SSOToken ssoToken = manager.createSSOToken(request);
manager.validateToken(ssoToken);
String ssoPropLocale = ssoToken.getProperty("Locale");
((ssoPropLocale != null) && (ssoPropLocale.length() > 0)) ?
ResourceBundle.getBundle("encode");
if (ssoToken.getPrincipal().getName().equalsIgnoreCase(
"id=amadmin,ou=user," + SMSEntry.getRootSuffix())
String strPwd = request.getParameter("password");
if ((strPwd != null) && (strPwd.trim().length() > 0)) {
new EncodeAction(strPwd.trim())));
rb.getString("encode-another-pwd") + "</a>");
"<form name=\"frm\" action=\"encode.jsp\" method=\"post\">");
out.println("<input type=\"text\" name=\"password\" />");
out.println("<input type=\"submit\" value=\"" +
rb.getString("btn-encode") + "\" />");
out.println("</form>");