a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * The contents of this file are subject to the terms
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * of the Common Development and Distribution License
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * (the License). You may not use this file except in
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * compliance with the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * You can obtain a copy of the License at
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * See the License for the specific language governing
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * permission and limitations under the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * When distributing Covered Code, include this CDDL
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Header Notice in each file and include the License file
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * If applicable, add the following below the CDDL Header,
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * with the fields enclosed by brackets [] replaced by
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * your own identifying information:
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * $Id: IdRemoteServicesImpl.java,v 1.23 2010/01/06 01:58:26 veiming Exp $
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Portions Copyrighted 2013-2016 ForgeRock AS.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.authentication.spi.AuthLoginException;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.common.CaseInsensitiveHashMap;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.common.CaseInsensitiveHashSet;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.security.AdminTokenAction;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.shared.jaxrpc.SOAPClient;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.sm.jaxrpc.SMSJAXRPCObject;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport org.forgerock.openam.session.SessionCookies;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Class that implements the remote services that are needed for IdRepo.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterpublic class IdRemoteServicesImpl implements IdServices {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster // TODO: Use a different JAX-RPC interface
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster protected static final String SDK_SERVICE = "DirectoryManagerIF";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster protected static final Debug DEBUG = Debug.getInstance("amIdmClient");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public static final String AMSR_RESULTS = "__results";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public static final String AMSR_CODE = "__errorCode";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public static final String AMSR_ATTRS = "__attrs";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Here we set sendRestrictionContext by checking a property
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * in agent configuration file and also if the server is
if (sendRestrictionContext) {
} catch (NumberFormatException e) {
} catch (SSOException e) {
} catch (SMSException e) {
return instance;
public Map getAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN,
if (isString) {
return res;
private Map<String, byte[][]> getBinaryAttributes(SSOToken token, IdType type, String name, Set<String> attrNames,
return ret;
return res;
int filterOp;
amsdkDN };
return resultSet;
return resultMap;
return resultMap;
return resultMap;
amsdkDN };
return idResults;
return idResults;
amOrgName };
return results;
return results;
isExists =
null));
int type) {
return (answer);
if (m != null) {
new CaseInsensitiveHashMap();
return results;
if (!sendRestrictionContext) {