SetupDistAuthWAR.java revision 25e37495f2591ee8f2c057f2644ed5570b4c078d
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 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
* 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: SetupDistAuthWAR.java,v 1.4 2008/06/25 05:40:27 qcheng Exp $
*
*/
/**
* Portions Copyrighted 2011 ForgeRock AS
*/
/**
* This setup the Distauth WAR.
*/
public class SetupDistAuthWAR {
private static final String TRUST_ALL_CERTS =
"com.iplanet.am.jssproxy.trustAllServerCerts=true\n";
private static final String CONFIG_VAR_DEFAULT_SHARED_KEY =
"KmhUnWR1MYWDYW4xuqdF5nbm+CXIyOVt";
/**
* Constructor
*/
throws ServletException {
}
/**
* Creates AMDistAuthConfig.properties file
* @param configFile Absolute path to the AMDistAuthConfig.properties to be created.
* @param templateFile Template file for AMDistAuthConfig.properties
* @param properties Properties to be swapped in the template
*/
public void createAMDistAuthConfigProperties(
}
("\ncom.iplanet.am.distauth.deploymentDescriptor=");
}
if (!configFileDirectory.exists()) {
}
}
throws IOException
{
}
}
}
/**
* Sets properties from AMDistAuthConfig.properties
* @param configFile path to the AMDistAuthConfig.properties file
* @throws ServletException when error occurs
*/
public void setAMDistAuthConfigProperties()
throws ServletException {
try {
} else {
}
} catch (FileNotFoundException fexp) {
} catch (IOException ioexp) {
} finally {
try {
} catch (IOException ioe) {
}
}
}
}
public static String generateKey() {
try {
byte [] bytes = new byte[24];
} catch (Exception e) {
e.printStackTrace();
}
}
throws ServletException {
if (servletCtx != null) {
} else {
}
if (idx != -1) {
}
}
}
return path;
}
/**
* Returns URL of the default resource.
*
* @return URL of the default resource. Returns null if servlet context is
* null.
*/
throws ServletException {
if (servletCtx != null) {
try {
} catch (MalformedURLException mue) {
}
}
return null;
}
}