/** * Finds the user based on the termination request received from a remote provider. * * @param reqTermination the termination request * @return <code>true</code> if the user is found; <code>false</code> otherwise. */ public boolean setUserID(FSFederationTerminationNotification reqTermination) { try { // UserDN needs to be figured from termination request String sourceProviderId = ""; if (managerInst != null) { sourceProviderId = reqTermination.getProviderId(); if (FSUtils.debug.messageEnabled()) { FSUtils.debug.message("sourceProviderId : " + sourceProviderId); } String opaqueHandle = (reqTermination.getNameIdentifier()).getName().trim(); if (FSUtils.debug.messageEnabled()) { FSUtils.debug.message("processTerminationRequest Handle : " + opaqueHandle); } String associatedDomain = (reqTermination.getNameIdentifier().getNameQualifier()).trim(); if (FSUtils.debug.messageEnabled()) { FSUtils.debug.message("Name Qualifier : " + associatedDomain); } if (FSUtils.debug.messageEnabled()) { FSUtils.debug.message("Realm : " + realm); } String searchDomain = hostedEntityId; if ((associatedDomain != null) && (associatedDomain.length() != 0) && (!sourceProviderId.equals(associatedDomain))) { searchDomain = associatedDomain; } FSAccountFedInfoKey acctkey = new FSAccountFedInfoKey(searchDomain, opaqueHandle); Map env = new HashMap(); env.put(IFSConstants.FS_USER_PROVIDER_ENV_TERMINATION_KEY, reqTermination); this.userID = managerInst.getUserID(acctkey, realm, env); if (this.userID == null) { acctkey = new FSAccountFedInfoKey(remoteEntityId, opaqueHandle); this.userID = managerInst.getUserID(acctkey, realm, env); if (this.userID == null) { FSUtils.debug.message("UserID is null"); return false; } } if (FSUtils.debug.messageEnabled()) { FSUtils.debug.message("user id is " + userID); } return true; } } catch (FSAccountMgmtException e) { FSUtils.debug.error("In FSAccountMgmtException :: ", e); } this.userID = null; return false; }