cli.jsp revision 4fe4e4f798a84a46e567f64ceadd3648eb0582d4
9N/A<%--
9N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
9N/A
9N/A Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
9N/A
9N/A The contents of this file are subject to the terms
9N/A of the Common Development and Distribution License
9N/A (the License). You may not use this file except in
9N/A compliance with the License.
9N/A
9N/A You can obtain a copy of the License at
9N/A https://opensso.dev.java.net/public/CDDLv1.0.html or
9N/A opensso/legal/CDDLv1.0.txt
9N/A See the License for the specific language governing
9N/A permission and limitations under the License.
9N/A
9N/A When distributing Covered Code, include this CDDL
9N/A Header Notice in each file and include the License file
9N/A at opensso/legal/CDDLv1.0.txt.
9N/A If applicable, add the following below the CDDL Header,
1470N/A with the fields enclosed by brackets [] replaced by
9N/A your own identifying information:
9N/A "Portions Copyrighted [year] [name of copyright owner]"
9N/A
9N/A $Id: cli.jsp,v 1.4 2008/09/09 21:31:43 qcheng Exp $
814N/A
1470N/A--%>
814N/A
814N/A<%@ page
814N/Aimport="com.sun.identity.cli.StringOutputWriter,
814N/A com.sun.identity.cli.CLIConstants,
814N/A com.sun.identity.cli.CLIRequest,
814N/A com.sun.identity.cli.CommandManager,
1470N/A com.iplanet.sso.SSOException,
814N/A com.iplanet.sso.SSOToken,
814N/A com.iplanet.sso.SSOTokenManager,
814N/A java.util.HashMap,
814N/A java.util.Map"
814N/A%>
814N/A
814N/A<%
814N/A StringOutputWriter outputWriter = new StringOutputWriter();
814N/A Map env = new HashMap();
814N/A env.put(CLIConstants.SYS_PROPERTY_OUTPUT_WRITER, outputWriter);
814N/A env.put(CLIConstants.ARGUMENT_LOCALE, request.getLocale());
814N/A env.put(CLIConstants.SYS_PROPERTY_DEFINITION_FILES,
814N/A "com.sun.identity.federation.cli.FederationManager");
1470N/A env.put(CLIConstants.SYS_PROPERTY_COMMAND_NAME, "ssoadm");
1470N/A CommandManager cmdManager = new CommandManager(env);
1470N/A
1470N/A SSOTokenManager manager = SSOTokenManager.getInstance();
1470N/A SSOToken ssoToken = null;
1470N/A try {
1470N/A ssoToken = manager.createSSOToken(request);
16N/A } catch (SSOException se) {
16N/A // do nothing
16N/A }
16N/A
16N/A%>
1470N/A