Class ProxyAuthenticator

  • All Implemented Interfaces:
    okhttp3.Authenticator


    public class ProxyAuthenticator
    extends Object
    implements okhttp3.Authenticator
    This class bridges the system default Authenticator for Basic auth and the Authenticator for any auth to the OkHttp proxy authenticator mechanism.
    • Constructor Detail

      • ProxyAuthenticator

        public ProxyAuthenticator​()
        Creates a new proxy authenticator that is capable of doing Basic auth with credentials from the system default authenticator.
      • ProxyAuthenticator

        public ProxyAuthenticator​(Authenticator authenticator)
        Creates a new proxy authenticator that requests the authentication headers to set from the given authenticator.
        Parameters:
        authenticator - The authenticator to delegate work to.
    • Method Detail

      • authenticate

        public okhttp3.Request authenticate​(okhttp3.Route route,
                                            okhttp3.Response response)
                                     throws IOException
        Specified by:
        authenticate in interface okhttp3.Authenticator
        Throws:
        IOException