@@ -58,8 +58,7 @@ protected void addTransportLayers(final Event event, final TransportInternal tra
5858 // after creating the socket to proxy
5959 final String hostName = event .getConnection ().getHostname ();
6060 final ProxyHandler proxyHandler = new ProxyHandlerImpl ();
61- final Map <String , String > proxyHeader = getAuthorizationHeader ();
62- proxy .configure (hostName , proxyHeader , proxyHandler , transport );
61+ proxy .configure (hostName , null , proxyHandler , transport );
6362
6463 transport .addTransportLayer (proxy );
6564
@@ -119,38 +118,6 @@ public int getRemotePort() {
119118 return socketAddress .getPort ();
120119 }
121120
122- private Map <String , String > getAuthorizationHeader () {
123- final PasswordAuthentication authentication = Authenticator .requestPasswordAuthentication (
124- getRemoteHostName (),
125- null ,
126- getRemotePort (),
127- "https" ,
128- "Event Hubs client websocket proxy support" ,
129- "basic" ,
130- null ,
131- Authenticator .RequestorType .PROXY );
132- if (authentication == null ) {
133- return null ;
134- }
135-
136- final String proxyUserName = authentication .getUserName ();
137- final String proxyPassword = authentication .getPassword () != null
138- ? new String (authentication .getPassword ())
139- : null ;
140- if (StringUtil .isNullOrEmpty (proxyUserName )
141- || StringUtil .isNullOrEmpty (proxyPassword )) {
142- return null ;
143- }
144-
145- final HashMap <String , String > proxyAuthorizationHeader = new HashMap <>();
146- // https://tools.ietf.org/html/rfc7617
147- final String usernamePasswordPair = proxyUserName + ":" + proxyPassword ;
148- proxyAuthorizationHeader .put (
149- "Proxy-Authorization" ,
150- "Basic " + Base64 .getEncoder ().encodeToString (usernamePasswordPair .getBytes ()));
151- return proxyAuthorizationHeader ;
152- }
153-
154121 private InetSocketAddress getProxyAddress () {
155122 final URI serviceUri = createURIFromHostNamePort (
156123 this .getAmqpConnection ().getHostName (),
0 commit comments