aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java
diff options
context:
space:
mode:
authorLaurent Goujon <lgoujon@twitter.com>2014-02-24 14:47:51 -0800
committerChris Aniszczyk <caniszczyk@gmail.com>2014-05-21 11:00:26 -0500
commit4cb0bd8a43a8f09f8d7a1684870c5e6797f428d6 (patch)
treef79dd9753f31f577339a2250b0b27ef0a25075d7 /org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java
parent0b5441a8ce9a13ac255609f0a978ccd81b755b6d (diff)
downloadjgit-4cb0bd8a43a8f09f8d7a1684870c5e6797f428d6.tar.gz
jgit-4cb0bd8a43a8f09f8d7a1684870c5e6797f428d6.zip
Adds support for SPNEGO
Adds support for Negotiate(SPNEGO) HTTP authentication method. This method is set to have a higher priority as Digest HTTP authentication method. Bug: 428836 Change-Id: Ib181096d39f538df1dd7d3f36516843777bf12ae Signed-off-by: Laurent Goujon <lgoujon@twitter.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java
index 5a64b458fa..5233013582 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java
@@ -64,22 +64,31 @@ public class HttpAuthTest {
private static String bearerHeader = "WWW-Authenticate: Bearer";
+ private static String negotiateHeader = "WWW-Authenticate: Negotiate";
+
private static String URL_SAMPLE = "http://everyones.loves.git/u/2";
private static String BASIC = "Basic";
private static String DIGEST = "Digest";
+ private static String NEGOTIATE = "Negotiate";
+
@Test
public void testHttpAuthScanResponse() {
checkResponse(new String[] { basicHeader }, BASIC);
checkResponse(new String[] { digestHeader }, DIGEST);
+ checkResponse(new String[] { negotiateHeader }, NEGOTIATE);
checkResponse(new String[] { basicHeader, digestHeader }, DIGEST);
checkResponse(new String[] { digestHeader, basicHeader }, DIGEST);
+ checkResponse(new String[] { digestHeader, negotiateHeader }, NEGOTIATE);
+ checkResponse(new String[] { negotiateHeader, digestHeader }, NEGOTIATE);
checkResponse(new String[] { ntlmHeader, basicHeader, digestHeader,
bearerHeader }, DIGEST);
checkResponse(new String[] { ntlmHeader, basicHeader, bearerHeader },
BASIC);
+ checkResponse(new String[] { ntlmHeader, basicHeader, digestHeader,
+ negotiateHeader, bearerHeader }, NEGOTIATE);
}
private static void checkResponse(String[] headers,