code: private static boolean validateSignature(Map<String, String> parameters, Map<String, String> headers, String method, String url, String apiKey) throws OneTouchException, UnsupportedEncodingException {
  
          if (headers == null)
              throw new OneTouchException("No headers sent");
  
          if (!headers.containsKey(HEADER_AUTHY_SIGNATURE))
              throw new OneTouchException("'SIGNATURE' is missing.");
  
          if (!headers.containsKey(HEADER_AUTHY_SIGNATURE_NONCE))
              throw new OneTouchException("'NONCE' is missing.");
  
          if (parameters == null || parameters.isEmpty())
              throw new OneTouchException("'PARAMS' are missing.");
  
          StringBuilder sb = new StringBuilder(headers.get(HEADER_AUTHY_SIGNATURE_NONCE))
                  .append("|")
                  .append(method)
                  .append("|")
                  .append(url)
                  .append("|")
                  .append(mapToQuery(parameters));
  
          String signature = hmacSha(apiKey, sb.toString());
  
          // let's check that the Authy signature is valid
          return signature.equals(headers.get(HEADER_AUTHY_SIGNATURE));
      }
docs: Validates the request information to
  
  @param parameters The request parameters(all of them)
  @param headers    The headers of the request
  @param url        The url of the request.
  @param apiKey     the security token from the authy library
  @return true if the signature ios valid, false otherwise
  @throws UnsupportedEncodingException if the string parameters have problems with UTF-8 encoding.