HADOOP-10078. KerberosAuthenticator always does SPNEGO. (rkanter via tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1541721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f3cc7832b7
commit
0c220f30b3
|
@ -185,7 +185,7 @@ public class KerberosAuthenticator implements Authenticator {
|
||||||
conn.setRequestMethod(AUTH_HTTP_METHOD);
|
conn.setRequestMethod(AUTH_HTTP_METHOD);
|
||||||
conn.connect();
|
conn.connect();
|
||||||
|
|
||||||
if (conn.getRequestProperty(AUTHORIZATION) != null && conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
|
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
|
||||||
LOG.debug("JDK performed authentication on our behalf.");
|
LOG.debug("JDK performed authentication on our behalf.");
|
||||||
// If the JDK already did the SPNEGO back-and-forth for
|
// If the JDK already did the SPNEGO back-and-forth for
|
||||||
// us, just pull out the token.
|
// us, just pull out the token.
|
||||||
|
|
|
@ -136,7 +136,6 @@ public class AuthenticatorTestCase {
|
||||||
TestConnectionConfigurator connConf = new TestConnectionConfigurator();
|
TestConnectionConfigurator connConf = new TestConnectionConfigurator();
|
||||||
AuthenticatedURL aUrl = new AuthenticatedURL(authenticator, connConf);
|
AuthenticatedURL aUrl = new AuthenticatedURL(authenticator, connConf);
|
||||||
HttpURLConnection conn = aUrl.openConnection(url, token);
|
HttpURLConnection conn = aUrl.openConnection(url, token);
|
||||||
Assert.assertTrue(token.isSet());
|
|
||||||
Assert.assertTrue(connConf.invoked);
|
Assert.assertTrue(connConf.invoked);
|
||||||
String tokenStr = token.toString();
|
String tokenStr = token.toString();
|
||||||
if (doPost) {
|
if (doPost) {
|
||||||
|
|
|
@ -188,6 +188,8 @@ Release 2.2.1 - UNRELEASED
|
||||||
as [-Dkey, value] which breaks GenericsOptionParser.
|
as [-Dkey, value] which breaks GenericsOptionParser.
|
||||||
(Enis Soztutar via cnauroth)
|
(Enis Soztutar via cnauroth)
|
||||||
|
|
||||||
|
HADOOP-10078. KerberosAuthenticator always does SPNEGO. (rkanter via tucu)
|
||||||
|
|
||||||
Release 2.2.0 - 2013-10-13
|
Release 2.2.0 - 2013-10-13
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
Loading…
Reference in New Issue