@@ -153,7 +153,7 @@ private static class SPNEGOMutualService implements HttpRequestHandler {
153153 final boolean sendMutualToken ;
154154 final byte [] encodedMutualAuthToken ;
155155
156- SPNEGOMutualService (final boolean sendMutualToken , final byte [] encodedMutualAuthToken ){
156+ SPNEGOMutualService (final boolean sendMutualToken , final byte [] encodedMutualAuthToken ) {
157157 this .sendMutualToken = sendMutualToken ;
158158 this .encodedMutualAuthToken = encodedMutualAuthToken ;
159159 }
@@ -170,9 +170,9 @@ public void handle(
170170 response .addHeader (new BasicHeader ("WWW-Authenticate" , StandardAuthScheme .SPNEGO ));
171171 response .addHeader (new BasicHeader ("Connection" , "Keep-Alive" ));
172172 response .setEntity (new StringEntity ("auth required " ));
173- } else if (callCount == 2 ) {
173+ } else if (callCount == 2 ) {
174174 callCount ++;
175- if (request .getHeader ("Authorization" ).getValue ().contains (GOOD_TOKEN_B64 )) {
175+ if (request .getHeader ("Authorization" ).getValue ().contains (GOOD_TOKEN_B64 )) {
176176 response .setCode (HttpStatus .SC_OK );
177177 if (sendMutualToken ) {
178178 response .addHeader (new BasicHeader ("WWW-Authenticate" , StandardAuthScheme .SPNEGO + " " + new String (encodedMutualAuthToken )));
@@ -293,7 +293,7 @@ public AuthScheme create(final HttpContext context) {
293293 * the server still keep asking for a valid ticket.
294294 */
295295 @ Test
296- public void testDontTryToAuthenticateEndlessly () throws Exception {
296+ void testDontTryToAuthenticateEndlessly () throws Exception {
297297 configureServer (t -> {
298298 t .register ("*" , new PleaseNegotiateService ());
299299 });
@@ -308,7 +308,7 @@ public void testDontTryToAuthenticateEndlessly() throws Exception {
308308 t .setDefaultCredentialsProvider (jaasCredentialsProvider );
309309 });
310310
311- final HttpHost target = startServer ();
311+ final HttpHost target = startServer ();
312312 final String s = "/path" ;
313313 final HttpGet httpget = new HttpGet (s );
314314 client ().execute (target , httpget , response -> {
@@ -323,7 +323,7 @@ public void testDontTryToAuthenticateEndlessly() throws Exception {
323323 * if no token is generated. Client should be able to deal with this response.
324324 */
325325 @ Test
326- public void testNoTokenGeneratedError () throws Exception {
326+ void testNoTokenGeneratedError () throws Exception {
327327 configureServer (t -> {
328328 t .register ("*" , new PleaseNegotiateService ());
329329 });
@@ -339,7 +339,7 @@ public void testNoTokenGeneratedError() throws Exception {
339339 });
340340
341341
342- final HttpHost target = startServer ();
342+ final HttpHost target = startServer ();
343343 final String s = "/path" ;
344344 final HttpGet httpget = new HttpGet (s );
345345 client ().execute (target , httpget , response -> {
@@ -354,11 +354,11 @@ public void testNoTokenGeneratedError() throws Exception {
354354 * Test the success case for mutual auth
355355 */
356356 @ Test
357- public void testMutualSuccess () throws Exception {
357+ void testMutualSuccess () throws Exception {
358358 configureServer (t -> {
359359 t .register ("*" , new SPNEGOMutualService (true , GOOD_MUTUAL_AUTH_TOKEN_B64_BYTES ));
360360 });
361- final HttpHost target = startServer ();
361+ final HttpHost target = startServer ();
362362
363363 final MutualNegotiateSchemeWithMockGssManager mockAuthScheme = new MutualNegotiateSchemeWithMockGssManager (true , true );
364364 final AuthSchemeFactory nsf = new TestAuthSchemeFactory (mockAuthScheme );
@@ -388,7 +388,7 @@ public void testMutualSuccess() throws Exception {
388388 * No mutual auth response token sent by server.
389389 */
390390 @ Test
391- public void testMutualFailureNoToken () throws Exception {
391+ void testMutualFailureNoToken () throws Exception {
392392 configureServer (t -> {
393393 t .register ("*" , new SPNEGOMutualService (false , null ));
394394 });
@@ -407,7 +407,7 @@ public void testMutualFailureNoToken() throws Exception {
407407 final HttpClientContext context = new HttpClientContext ();
408408 context .setCredentialsProvider (jaasCredentialsProvider );
409409
410- final HttpHost target = startServer ();
410+ final HttpHost target = startServer ();
411411 final String s = "/path" ;
412412 final HttpGet httpget = new HttpGet (s );
413413 try {
@@ -430,7 +430,7 @@ public void testMutualFailureNoToken() throws Exception {
430430 * Server sends a "valid" token, but we mock the established status to false
431431 */
432432 @ Test
433- public void testMutualFailureEstablishedStatusFalse () throws Exception {
433+ void testMutualFailureEstablishedStatusFalse () throws Exception {
434434 configureServer (t -> {
435435 t .register ("*" , new SPNEGOMutualService (true , GOOD_MUTUAL_AUTH_TOKEN_B64_BYTES ));
436436 });
@@ -448,7 +448,7 @@ public void testMutualFailureEstablishedStatusFalse() throws Exception {
448448 final HttpClientContext context = new HttpClientContext ();
449449 context .setCredentialsProvider (jaasCredentialsProvider );
450450
451- final HttpHost target = startServer ();
451+ final HttpHost target = startServer ();
452452 final String s = "/path" ;
453453 final HttpGet httpget = new HttpGet (s );
454454 try {
@@ -471,7 +471,7 @@ public void testMutualFailureEstablishedStatusFalse() throws Exception {
471471 * Server sends a "valid" token, but we mock the mutual auth status to false
472472 */
473473 @ Test
474- public void testMutualFailureMutualStatusFalse () throws Exception {
474+ void testMutualFailureMutualStatusFalse () throws Exception {
475475 configureServer (t -> {
476476 t .register ("*" , new SPNEGOMutualService (true , GOOD_MUTUAL_AUTH_TOKEN_B64_BYTES ));
477477 });
@@ -489,7 +489,7 @@ public void testMutualFailureMutualStatusFalse() throws Exception {
489489 final HttpClientContext context = new HttpClientContext ();
490490 context .setCredentialsProvider (jaasCredentialsProvider );
491491
492- final HttpHost target = startServer ();
492+ final HttpHost target = startServer ();
493493 final String s = "/path" ;
494494 final HttpGet httpget = new HttpGet (s );
495495 try {
@@ -512,7 +512,7 @@ public void testMutualFailureMutualStatusFalse() throws Exception {
512512 * Server sends a "bad" token, and GSS throws an exception.
513513 */
514514 @ Test
515- public void testMutualFailureBadToken () throws Exception {
515+ void testMutualFailureBadToken () throws Exception {
516516 configureServer (t -> {
517517 t .register ("*" , new SPNEGOMutualService (true , BAD_MUTUAL_AUTH_TOKEN_B64_BYTES ));
518518 });
@@ -532,7 +532,7 @@ public void testMutualFailureBadToken() throws Exception {
532532 final HttpClientContext context = new HttpClientContext ();
533533 context .setCredentialsProvider (jaasCredentialsProvider );
534534
535- final HttpHost target = startServer ();
535+ final HttpHost target = startServer ();
536536 final String s = "/path" ;
537537 final HttpGet httpget = new HttpGet (s );
538538 try {
0 commit comments