private String sign(
      final String baseUrl, final Map<String, String> params, final Map<String, String> cookieMap)
      throws ForbiddenException {
    final String key = cookieMap.get(SessionAttributeKeys.KEY);
    if (StringUtils.isBlank(key)) {
      m_log.error("No key");
      throw new ForbiddenException("No key");
    }
    final String preSignatureUrl = UriUtils.newUrl(baseUrl, params);
    final String sig = SecurityUtils.signAndEncode(key, preSignatureUrl);

    return UriUtils.appendParam(preSignatureUrl, "signature", sig);
  }
 private String post(final String baseUrl, final Map<String, String> params)
     throws IOException, ForbiddenException {
   final String url = UriUtils.newUrl(baseUrl, params);
   final HttpMethod method = new PostMethod(url);
   return post(method);
 }