org.apache.jmeter

## Class ProxyAuthenticator

- java.lang.Object
- - java.net.Authenticator
  - - org.apache.jmeter.ProxyAuthenticator

-     public class ProxyAuthenticator
      extends java.net.Authenticator

  Provides JMeter the ability to use proxy servers that require username and password.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.net.Authenticator

      `java.net.Authenticator.RequestorType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProxyAuthenticator(java.lang.String userName, java.lang.String password)` Create a ProxyAuthenticator with the specified username and password.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.net.PasswordAuthentication` | `getPasswordAuthentication()` Return a PasswordAuthentication instance using the userName and password specified in the constructor.

    - ### Methods inherited from class java.net.Authenticator

      `getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProxyAuthenticator

          public ProxyAuthenticator(java.lang.String userName,
                                    java.lang.String password)

      Create a ProxyAuthenticator with the specified username and password.
      Parameters:
        `userName` - the username to authenticate with
        `password` - the password to authenticate with

  - ### Method Detail

    - #### getPasswordAuthentication

          protected java.net.PasswordAuthentication getPasswordAuthentication()

      Return a PasswordAuthentication instance using the userName and password specified in the constructor. Only applies to PROXY request types.
      Overrides:
        `getPasswordAuthentication` in class `java.net.Authenticator`
      Returns:
        a PasswordAuthentication instance to use for authenticating with the proxy

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.