8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * $Id: AuthConfigurationEntry.java,v 1.4 2008/06/25 05:41:52 qcheng Exp $
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Represents one Authentication Configuration Entry
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterpublic class AuthConfigurationEntry implements Serializable {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private static Debug debug = Debug.getInstance("amAuthConfig");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Constructor.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param module Login Module class name example
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <code>com.sun.identity.authentication.modules.ldap.LDAP</code>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param flag Control flag, one of
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <code>REQUIRED, OPTIONAL, REQUISITE, SUFFICIENT</code>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param options Options as space separated string.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @throws AMConfigurationException if module or flag is null or flag is
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public AuthConfigurationEntry(String module, String flag, String options)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Constructor.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster debug.message("AuthConfigEntry, value=" + node.toString());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String value = node.getFirstChild().getNodeValue();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster debug.error("AuthConfigEntry, invalid value=" + value);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster AMAuthConfigUtils.bundleName, "invalidConfig");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster debug.error("AuthConfigEntry, invalid value=" + value);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster AMAuthConfigUtils.bundleName, "invalidConfig");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // set module
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // no options
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster this.options = value.substring(pos + 1).trim();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns string representation of this object.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return string representation of this object.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns login module name
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return login module name
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets login module name
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param moduleName module name.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @throws AMConfigurationException if module is null.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void setLoginModuleName(String moduleName)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns control flag .
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return control flag .
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets control flag.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param flag control flag
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @throws AMConfigurationException if flag is null or invalid.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void setControlFlag(String flag) throws AMConfigurationException {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns options.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return options.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets options.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param options
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private void checkModule(String module) throws AMConfigurationException {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster AMAuthConfigUtils.bundleName, "invalidConfig");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private void checkFlag(String flag) throws AMConfigurationException{
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster AMAuthConfigUtils.bundleName, "invalidConfig");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster debug.warning("AuthConfigEntry, invalid flag : " + flag);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster AMAuthConfigUtils.bundleName, "invalidConfig");