Ejemplo n.º 1
0
 /**
  * Add DIGEST credentials to all requests
  *
  * @param realm the realm that the username and password are in
  * @param user username
  * @param password password
  */
 public void setCredentials(String realm, String user, String password)
     throws HoneycombTestException {
   try {
     String host = conn.getHost();
     int port = conn.getPort();
     AuthorizationInfo.addDigestAuthorization(host, port, realm, user, password);
   } catch (Exception e) {
     throw new HoneycombTestException(
         "Couldn't add credential " + realm + ":" + user + " -- " + e);
   }
 }