code: protected String resolveCookieName(Cookie[] cookies) {
          boolean foundCookie = false;
          String ssoCookieName = this.getSSOCookiename();
          if (cookies != null) {
              for (int i = 0; i < cookies.length; i++) {
                  if (cookies[i].getName().equalsIgnoreCase(ssoCookieName)) {
                      foundCookie = true;
                      break;
                  }
              }
          }
          if (!foundCookie && !config.isUseOnlyCustomCookieName())
              return SSOAuthenticator.DEFAULT_SSO_COOKIE_NAME;
          else
              return ssoCookieName;
      }
docs: 1) If we found the cookie associate with the cookie name, we will use the cookie name
  2) If we can not find the cookie associate with the cookie name, we will use the default cookie name LTPAToken2 if isUseOnlyCustomCookieName is false