/**
  * Resets ederate cookie when termination is done with one remote provider. If no active
  * federations exists then the cookie is set to "no"; otherwise it is set to "yes".
  */
 public void resetFederateCookie() {
   try {
     if (userID == null || userID.length() < 1) {
       return;
     } else {
       Cookie fedCookie;
       String cookieValue;
       if (managerInst.hasAnyActiveFederation(userID)) {
         if (FSUtils.debug.messageEnabled()) {
           FSUtils.debug.message("User : "******" Federation Exists : " + IFSConstants.YES);
         }
         cookieValue = IFSConstants.YES;
       } else {
         if (FSUtils.debug.messageEnabled()) {
           FSUtils.debug.message("User : "******" Federation Exists : " + IFSConstants.NO);
         }
         cookieValue = IFSConstants.NO;
       }
       FSUtils.debug.message("Setting Path to /");
       if (FSUtils.debug.messageEnabled()) {
         FSUtils.debug.message("Setting Age to " + IFSConstants.PERSISTENT_COOKIE_AGE + " Age");
       }
       Set<String> domains = SystemConfigurationUtil.getCookieDomainsForRequest(request);
       if (FSUtils.debug.messageEnabled()) {
         FSUtils.debug.message("Provider cookie domain list is " + domains);
       }
       for (String domain : domains) {
         CookieUtils.addCookieToResponse(
             response,
             CookieUtils.newCookie(
                 FEDERATE_COOKIE_NAME,
                 cookieValue,
                 IFSConstants.PERSISTENT_COOKIE_AGE,
                 "/",
                 domain));
       }
     }
   } catch (FSAccountMgmtException e) {
     FSUtils.debug.error("Unable to read user federation information", e);
     return;
   }
 }