AmWLPortalVerificationHandler.java revision de47fb992b4c3414ac5b445d5cab364b0b8b8b43
af062818b47340eef15700d2f0211576ba3506eevboxsync * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
af062818b47340eef15700d2f0211576ba3506eevboxsync * The contents of this file are subject to the terms
af062818b47340eef15700d2f0211576ba3506eevboxsync * of the Common Development and Distribution License
af062818b47340eef15700d2f0211576ba3506eevboxsync * (the License). You may not use this file except in
af062818b47340eef15700d2f0211576ba3506eevboxsync * compliance with the License.
af062818b47340eef15700d2f0211576ba3506eevboxsync * You can obtain a copy of the License at
af062818b47340eef15700d2f0211576ba3506eevboxsync * https://opensso.dev.java.net/public/CDDLv1.0.html or
af062818b47340eef15700d2f0211576ba3506eevboxsync * See the License for the specific language governing
af062818b47340eef15700d2f0211576ba3506eevboxsync * permission and limitations under the License.
af062818b47340eef15700d2f0211576ba3506eevboxsync * When distributing Covered Code, include this CDDL
af062818b47340eef15700d2f0211576ba3506eevboxsync * Header Notice in each file and include the License file
af062818b47340eef15700d2f0211576ba3506eevboxsync * If applicable, add the following below the CDDL Header,
af062818b47340eef15700d2f0211576ba3506eevboxsync * with the fields enclosed by brackets [] replaced by
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * your own identifying information:
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * "Portions Copyrighted [year] [name of copyright owner]"
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * $Id: AmWLPortalVerificationHandler.java,v 1.2 2008/06/25 05:52:22 qcheng Exp $
af062818b47340eef15700d2f0211576ba3506eevboxsyncimport com.sun.identity.agents.realm.AmRealmManager;
af062818b47340eef15700d2f0211576ba3506eevboxsyncimport com.sun.identity.agents.realm.GenericExternalVerificationHandler;
af062818b47340eef15700d2f0211576ba3506eevboxsync * Class AmWLPortalVerificationHandler
af062818b47340eef15700d2f0211576ba3506eevboxsync * @see This class will be used to verify the presence of an user in
af062818b47340eef15700d2f0211576ba3506eevboxsync * WL10.0 portal repository.
af062818b47340eef15700d2f0211576ba3506eevboxsyncpublic class AmWLPortalVerificationHandler extends
af062818b47340eef15700d2f0211576ba3506eevboxsync * Method userExists
af062818b47340eef15700d2f0211576ba3506eevboxsync * @param userName User trying to authenticate
af062818b47340eef15700d2f0211576ba3506eevboxsync * @param tt Transport Token
af062818b47340eef15700d2f0211576ba3506eevboxsync * @param data
af062818b47340eef15700d2f0211576ba3506eevboxsync * @return true if the user exists, otherwise it's false.
af062818b47340eef15700d2f0211576ba3506eevboxsync public boolean verify(String userName, TransportToken tt, Object data) {
af062818b47340eef15700d2f0211576ba3506eevboxsync boolean result = false;
af062818b47340eef15700d2f0211576ba3506eevboxsync IModuleAccess modAccess = AmRealmManager.getModuleAccess();
af062818b47340eef15700d2f0211576ba3506eevboxsync modAccess.logMessage("AmWLPortalVerificationHandler.verify - " +
af062818b47340eef15700d2f0211576ba3506eevboxsync // get and invoke AtnSecurityMgmtHelper.getDefaultProvider();
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync "com.bea.p13n.security.management.authentication." +
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync "AtnSecurityMgmtHelper",
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync "getDefaultProvider",
040b4a09341f574825386333398110f4db3e1e51vboxsync Object providerDescription = method.invoke(null, parameters );
040b4a09341f574825386333398110f4db3e1e51vboxsync // get and invoke new AtnManagerProxy(AtnProviderDescription).
040b4a09341f574825386333398110f4db3e1e51vboxsync "com.bea.p13n.security.management.authentication." +
114410893548b9522c46fdcbd8f63385eb8bfb68vboxsync "AtnProviderDescription");
040b4a09341f574825386333398110f4db3e1e51vboxsync Constructor constructor = AmWLAgentUtils.getConstructorMethod(
af062818b47340eef15700d2f0211576ba3506eevboxsync "com.bea.p13n.security.management.authentication." +
af062818b47340eef15700d2f0211576ba3506eevboxsync "AtnManagerProxy",
af062818b47340eef15700d2f0211576ba3506eevboxsync Object managerProxy= constructor.newInstance(parameters);
af062818b47340eef15700d2f0211576ba3506eevboxsync // get and invoke AtnManagerProxy.userExists().
af062818b47340eef15700d2f0211576ba3506eevboxsync "com.bea.p13n.security.management.authentication." +
af062818b47340eef15700d2f0211576ba3506eevboxsync "AtnManagerProxy",
af062818b47340eef15700d2f0211576ba3506eevboxsync "userExists",
af062818b47340eef15700d2f0211576ba3506eevboxsync modAccess.logWarning("AmWLPortalVerificationHandler.verify - "
af062818b47340eef15700d2f0211576ba3506eevboxsync "AmWLPortalVerificationHandler.verify - " +
af062818b47340eef15700d2f0211576ba3506eevboxsync " ,returned result = " +
af062818b47340eef15700d2f0211576ba3506eevboxsync "AmWLPortalVerificationHandler.verify - " +