Package org.apache.jmeter.protocol.http.control

Examples of org.apache.jmeter.protocol.http.control.Authorization


            }
        }

        @Override
        public void setValueAt(Object value, int row, int column) {
            Authorization auth = manager.getAuthObjectAt(row);
            log.debug("Setting auth value: " + value);
            switch (column){
                case AuthManager.COL_URL:
                    auth.setURL((String) value);
                    break;
                case AuthManager.COL_USERNAME:
                    auth.setUser((String) value);
                    break;
                case AuthManager.COL_PASSWORD:
                    auth.setPass((String) value);
                    break;
                case AuthManager.COL_DOMAIN:
                    auth.setDomain((String) value);
                    break;
                case AuthManager.COL_REALM:
                    auth.setRealm((String) value);
                    break;
                case AuthManager.COL_MECHANISM:
                    auth.setMechanism((Mechanism) value);
                    break;
                default:
                    break;
            }
        }
View Full Code Here


        String authHeader = authManager.getAuthHeaderForURL(u);
        if (authHeader != null) {
          method.setRequestHeader("Authorization", authHeader);
        }
      } else {
        Authorization auth = authManager.getAuthForURL(u);
        if (auth != null) {
          // TODO - set up realm, thishost and domain
          httpState.setCredentials(null, // "realm"
              auth.getURL(), new NTCredentials(// Includes
                                // other types
                                // of
                                // Credentials
                  auth.getUser(), auth.getPass(), null, // "thishost",
                  null // "targetdomain"
              ));
        }
      }
    }
View Full Code Here

      // set the auth. thanks to KiYun Roe for contributing the patch
      // I cleaned up the patch slightly. 5-26-05
      if (getAuthManager() != null) {
        if (getAuthManager().getAuthForURL(getUrl()) != null) {
          AuthManager authmanager = getAuthManager();
          Authorization auth = authmanager.getAuthForURL(getUrl());
          spconn.setUserName(auth.getUser());
          spconn.setPassword(auth.getPass());
        } else {
          log.warn("the URL for the auth was null." + " Username and password not set");
        }
      }
      // check the proxy
View Full Code Here

    /**
     * Required by table model interface.
     */
    public Object getValueAt(int row, int column) {
      Authorization auth = manager.getAuthObjectAt(row);

      if (column == 0) {
        return auth.getURL();
      } else if (column == 1) {
        return auth.getUser();
      } else if (column == 2) {
        return auth.getPass();
      }
      return null;
    }
View Full Code Here

      }
      return null;
    }

    public void setValueAt(Object value, int row, int column) {
      Authorization auth = manager.getAuthObjectAt(row);
      log.debug("Setting auth value: " + value);
      if (column == 0) {
        auth.setURL((String) value);
      } else if (column == 1) {
        auth.setUser((String) value);
      } else if (column == 2) {
        auth.setPass((String) value);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.protocol.http.control.Authorization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.