Revert "HTTPCLIENT-1712: SPNego schemes to take service scheme into account when generating auth token"

This reverts commit 1d50c1a1a1.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1735108 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2016-03-15 15:26:32 +00:00
parent 8f3829334d
commit 1b41b52b14
1 changed files with 1 additions and 5 deletions

View File

@ -28,7 +28,6 @@ package org.apache.http.impl.auth;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Locale;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.logging.Log;
@ -80,7 +79,6 @@ public abstract class GGSSchemeBase extends AuthSchemeBase {
/** base64 decoded challenge **/
private byte[] token;
private String service;
GGSSchemeBase(final boolean stripPort, final boolean useCanonicalHostname) {
super();
@ -118,7 +116,7 @@ public abstract class GGSSchemeBase extends AuthSchemeBase {
inputBuff = new byte[0];
}
final GSSManager manager = getManager();
final GSSName serverName = manager.createName(service + "@" + authServer, GSSName.NT_HOSTBASED_SERVICE);
final GSSName serverName = manager.createName("HTTP@" + authServer, GSSName.NT_HOSTBASED_SERVICE);
final GSSCredential gssCredential;
if (credentials instanceof KerberosCredentials) {
@ -214,8 +212,6 @@ public abstract class GGSSchemeBase extends AuthSchemeBase {
authServer = hostname + ":" + host.getPort();
}
service = host.getSchemeName().toUpperCase(Locale.ROOT);
if (log.isDebugEnabled()) {
log.debug("init " + authServer);
}