getServerInfo.jsp revision e8721886dbfd32e88cc7077cbee4b6bb1b44b443
8bb95fe13ab4a36335f43c5633243b777d4ddbadjohanengelen DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm The contents of this file are subject to the terms
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm of the Common Development and Distribution License
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm (the License). You may not use this file except in
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm compliance with the License.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm You can obtain a copy of the License at
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm See the License for the specific language governing
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm permission and limitations under the License.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm When distributing Covered Code, include this CDDL
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm Header Notice in each file and include the License file
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm If applicable, add the following below the CDDL Header,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm with the fields enclosed by brackets [] replaced by
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm your own identifying information:
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm "Portions Copyrighted [year] [name of copyright owner]"
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm $Id: getServerInfo.jsp,v 1.6 2008/09/04 00:34:01 rajeevangal Exp $
62d835b4bbb0f1f046e30d9b67f8e9517cc6175cjohanengelen<%-- Portions Copyrighted [2010] [ForgeRock AS] --%>
a39c187369a59e887255e3f704a3ababf2b10678Johan B. C. Engelen com.iplanet.services.naming.WebtopNaming,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm String method = request.getMethod();
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm if ("POST".equals(request.getMethod()) != true) {
response.sendError(405);
String username = request.getParameter("IDToken1");
String password = request.getParameter("IDToken2");
response.sendError(400);
username = URLDecoder.decode(username, "UTF-8");
password = URLDecoder.decode(password, "UTF-8");
response.sendError(401);
lc.login();
while (lc.hasMoreRequirements()) {
Callback[] callbacks = lc.getRequirements();
for (int i = 0; i < callbacks.length; i++) {
nc.setName(username);
missing.add(callbacks[i]);
if (missing.size() > 0) {
response.sendError(401);
lc.submitRequirements(callbacks);
response.sendError(401);
SSOTokenManager mgr = SSOTokenManager.getInstance();
Map bMap = bootstrapData.getDataAsMap(0);
String serverid = WebtopNaming.getLocalServer();
replPort = ""+ AMSetupServlet.getUnusedPort("localhost", 50889, 1000);
append(URLEncoder.encode(dsprotocol, "UTF-8")).append("&");
append(URLEncoder.encode(dshost, "UTF-8")).append("&");
append(URLEncoder.encode(dsbasedn, "UTF-8")).append("&");
append(URLEncoder.encode(dsmgr, "UTF-8")).append("&");
append(URLEncoder.encode(dspwd, "UTF-8")).append("&");
append(URLEncoder.encode(encKey, "UTF-8"));
buf.append("&ENCLDAPUSERPASSWD=").append(
URLEncoder.encode(defAgentPwd, "UTF-8"));
buf.append("&existingserverid=").append(
URLEncoder.encode(serverid, "UTF-8"));