Package com.maverick.http

Examples of com.maverick.http.PasswordCredentials


      int port = localProxyURL.getPort();
      setDefaultProxyType(localProxyURL.getScheme().equals("https") ? HttpClient.PROXY_HTTPS : HttpClient.PROXY_HTTP); //$NON-NLS-1$
      setDefaultProxyHost(localProxyURL.getHost());
      setDefaultProxyPort(port == -1 ? 80 : port);
      if (!user.equals("")) { //$NON-NLS-1$
        setDefaultProxyCredentials(new PasswordCredentials(user,
            password));
      }
      if (localProxyURL.getQueryString() != null) {
        setDefaultProxyPreferredAuthentication(localProxyURL
            .getQueryString());
View Full Code Here


           
      for (int i = 0; i < 3; i++) {

              HttpClient client = getHttpClient();
              if (doPreemptive) {
                  client.setCredentials(new PasswordCredentials(username,
                          ticket));
                  client.setPreferredAuthentication("Basic");
              }
              else {
                  client.setCredentials(null);
View Full Code Here

        if (!requestProcessor.getWebForward().getPreferredAuthenticationScheme().equals(HttpAuthenticatorFactory.NONE) && !requestProcessor.getWebForward()
                .getAuthenticationUsername()
                .equals("")
          && !requestProcessor.getWebForward().getAuthenticationPassword().equals("")) {
          PasswordCredentials pwd = new PasswordCredentials();
          pwd.setUsername(SessionInfoReplacer.replace(requestProcessor.getSessionInfo(), requestProcessor.getWebForward()
                  .getAuthenticationUsername()));
          pwd.setPassword(SessionInfoReplacer.replace(requestProcessor.getSessionInfo(), requestProcessor.getWebForward()
                  .getAuthenticationPassword()));
          client.setCredentials(pwd);
        }

        // Set the preferred scheme
View Full Code Here

        client.setIncludeCookies(false);
       
        if (!webForward.getPreferredAuthenticationScheme().equals(HttpAuthenticatorFactory.NONE) && !webForward.getAuthenticationUsername()
                .equals("")
          && !webForward.getAuthenticationPassword().equals("")) {
          PasswordCredentials pwd = new PasswordCredentials();
          pwd.setUsername(SessionInfoReplacer.replace(launchSession.getSession(), webForward.getAuthenticationUsername()));
          pwd.setPassword(SessionInfoReplacer.replace(launchSession.getSession(), webForward.getAuthenticationPassword()));
          client.setCredentials(pwd);
        }

        // Set the preferred scheme
        client.setPreferredAuthentication(webForward.getPreferredAuthenticationScheme());
View Full Code Here

        System.setProperty("com.maverick.ssl.allowUntrustedCertificates", "true");
        System.setProperty("com.maverick.ssl.allowInvalidCertificates", "true");
       
        HttpClient client = new HttpClient("127.0.0.1", 443, true);
        GetMethod get = new GetMethod("AGENT", "/");
        client.setCredentials(new PasswordCredentials("lee", "xxxxxxxxxx"));
        client.setPreemtiveAuthentication(true);
       
        HttpResponse response = client.execute(get);
       
        c = new MultiplexedConnection(new SocketChannelFactory());
View Full Code Here

    // Show dialog

    try {
      if (opt.open()) {
        authenticator.setCredentials(new PasswordCredentials(usernameText.getText().trim(), passwordText.getText()));
        if (domainText != null && !domainText.getText().trim().equals("")) { //$NON-NLS-1$
          ((NTLMAuthentication) authenticator).setDomain(domainText.getText().trim());
        }
        return true;
      }
View Full Code Here

                }
            });
        }

        if (dialog.dialogPrompt(null, Messages.getString("AuthenticationDialog.title")) == OptionDialog.CHOICE_OK) { //$NON-NLS-1$
            authenticator.setCredentials(new PasswordCredentials(username.getText().trim(), password.getText()));
            if (authenticator instanceof NTLMAuthentication && !domain.getText().trim().equals("")) { //$NON-NLS-1$
                ((NTLMAuthentication) authenticator).setDomain(domain.getText().trim());
            }
            return true;
        }
View Full Code Here

                    int port = Integer.parseInt(proxyPort);

                    HttpClient client = new HttpClient(proxyHost, port, isSecure);
                    HttpMethod method = new ConnectMethod(url.getHost(), url.getPort() == -1 ? 443 : url.getPort(), true);

                    PasswordCredentials credentials = new PasswordCredentials();
                    credentials.setUsername(proxyUsername);
                    credentials.setPassword(proxyPassword);

                    client.setCredentials(credentials);

                    HttpResponse response = client.execute(method);
                    socket = response.getConnection().getSocket();
View Full Code Here

TOP

Related Classes of com.maverick.http.PasswordCredentials

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.