<%-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. The contents of this file are subject to the terms of the Common Development and Distribution License (the License). You may not use this file except in compliance with the License. You can obtain a copy of the License at https://opensso.dev.java.net/public/CDDLv1.0.html or opensso/legal/CDDLv1.0.txt See the License for the specific language governing permission and limitations under the License. When distributing Covered Code, include this CDDL Header Notice in each file and include the License file at opensso/legal/CDDLv1.0.txt. If applicable, add the following below the CDDL Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyrighted [year] [name of copyright owner]" $Id: encode.jsp,v 1.13 2008/12/05 17:53:39 veiming Exp $ --%> <%-- Portions copyright 2010-2014 ForgeRock AS. --%> <%@page contentType="text/html; charset=UTF-8" %> OpenAM <%@page import="com.iplanet.sso.SSOException" %> <%@page import="com.iplanet.sso.SSOToken" %> <%@page import="com.sun.identity.security.EncodeAction" %> <%@page import="com.sun.identity.shared.locale.Locale" %> <%@page import="java.security.AccessController" %> <%@page import="java.util.ResourceBundle" %>
Jump to End of Masthead
OpenAM
Jump to End of Masthead
<%@ include file="/WEB-INF/jsp/admincheck.jsp" %> <% SSOToken ssoToken = requireAdminSSOToken(request, response, out, "showServerConfig.jsp"); if (ssoToken == null) { %> <% return; } %>
<% String ssoPropLocale; try { ssoPropLocale = ssoToken.getProperty("Locale"); } catch (SSOException e) { response.sendRedirect("UI/Login?goto=../encode.jsp"); return; } request.setCharacterEncoding("UTF-8"); ResourceBundle rb = ((ssoPropLocale != null) && (ssoPropLocale.length() > 0)) ? ResourceBundle.getBundle("encode", Locale.getLocale(ssoPropLocale)) : ResourceBundle.getBundle("encode"); String strPwd = request.getParameter("password"); if ((strPwd != null) && (strPwd.trim().length() > 0)) { out.println(rb.getString("result-encoded-pwd") + " "); out.println(AccessController.doPrivileged(new EncodeAction(strPwd.trim()))); out.println("

" + rb.getString("encode-another-pwd") + ""); } else { out.println("
"); out.println(rb.getString("prompt-pwd")); out.println(""); out.println(""); out.println("
"); } %>