UnregisterAuthModule.java revision 80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * The contents of this file are subject to the terms
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * of the Common Development and Distribution License
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * (the License). You may not use this file except in
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * compliance with the License.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * You can obtain a copy of the License at
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * https://opensso.dev.java.net/public/CDDLv1.0.html or
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * See the License for the specific language governing
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * permission and limitations under the License.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * When distributing Covered Code, include this CDDL
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Header Notice in each file and include the License file
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * If applicable, add the following below the CDDL Header,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * with the fields enclosed by brackets [] replaced by
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * your own identifying information:
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * "Portions Copyrighted [year] [name of copyright owner]"
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * $Id: UnregisterAuthModule.java,v 1.2 2008/06/25 05:42:12 qcheng Exp $
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimport com.sun.identity.authentication.util.ISAuthConstants;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimport com.sun.identity.cli.schema.SchemaCommand;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Adds custom authentication modules.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkpublic class UnregisterAuthModule extends SchemaCommand {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Services a Commandline Request.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * @param rc Request Context.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * @throws CLIException if the request cannot serviced.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk ServiceSchema ss = getServiceSchema(ISAuthConstants.AUTH_SERVICE_NAME,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk String[] params = {ISAuthConstants.AUTH_SERVICE_NAME};
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk boolean removed = false;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk RegisterAuthModule.AUTH_AUTHENTICATOR_ATTR, values);
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk getResourceString("unregister-auth-module-succeeded"));
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk getResourceString("unregister-auth-module-notfound"));
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk String[] args = {ISAuthConstants.AUTH_SERVICE_NAME,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk debugError("UnregisterAuthModule.handleRequest", e);
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk throw new CLIException(e, ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk String[] args = {ISAuthConstants.AUTH_SERVICE_NAME,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk debugError("UnregisterAuthModule.handleRequest", e);