@@ -182,25 +182,6 @@ public String getDigest(@Context HttpHeaders h) {
182
182
return "GET" ;
183
183
}
184
184
185
- @ GET
186
- @ Path ("basicAndDigest" )
187
- public String getBasicAndDigest (@ Context HttpHeaders h ) {
188
- String value = h .getRequestHeaders ().getFirst ("Authorization" );
189
- if (value == null ) {
190
- throw new WebApplicationException (
191
- Response .status (401 ).header ("WWW-Authenticate" , "Basic realm=\" WallyWorld\" " )
192
- .header ("WWW-Authenticate" , "Digest realm=\" WallyWorld\" " )
193
- .entity ("Forbidden" ).build ());
194
- } else if (value .startsWith ("Basic" )) {
195
- throw new WebApplicationException (
196
- Response .status (401 ).header ("WWW-Authenticate" , "Basic realm=\" WallyWorld\" " )
197
- .header ("WWW-Authenticate" , "Digest realm=\" WallyWorld\" " )
198
- .entity ("Digest authentication expected" ).build ());
199
- }
200
-
201
- return "GET" ;
202
- }
203
-
204
185
@ POST
205
186
public String post (@ Context HttpHeaders h , String e ) {
206
187
requestCount ++;
@@ -310,19 +291,6 @@ public void testAuthGetWithDigestFilter() {
310
291
assertEquals (cm .getTotalStats ().getLeased (), 0 );
311
292
}
312
293
313
- @ Test
314
- public void testAuthGetWithBasicAndDigestFilter () {
315
- ClientConfig cc = new ClientConfig ();
316
- PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager ();
317
- cc .connectorProvider (new ApacheConnectorProvider ());
318
- cc .property (ApacheClientProperties .CONNECTION_MANAGER , cm );
319
- Client client = ClientBuilder .newClient (cc );
320
- client .register (HttpAuthenticationFeature .universal ("name" , "password" ));
321
- WebTarget r = client .target (getBaseUri ()).path ("test/basicAndDigest" );
322
-
323
- assertEquals ("GET" , r .request ().get (String .class ));
324
- }
325
-
326
294
@ Test
327
295
@ Ignore ("JERSEY-1750: Cannot retry request with a non-repeatable request entity. How to buffer the entity?"
328
296
+ " Allow repeatable write in jersey?" )
0 commit comments