这样的事情有什么问题?
final Registry<AuthSchemeFactory> schemeFactoryRegistry = RegistryBuilder.<AuthSchemeFactory>create()
.register(StandardAuthScheme.BASIC, BasicSchemeFactory.INSTANCE)
.register(StandardAuthScheme.DIGEST, DigestSchemeFactory.INSTANCE)
.register(StandardAuthScheme.NTLM, NTLMSchemeFactory.INSTANCE)
.register(StandardAuthScheme.SPNEGO, new SPNegoSchemeFactory(
KerberosConfig.custom()
.setStripPort(KerberosConfig.Option.DEFAULT)
.setUseCanonicalHostname(KerberosConfig.Option.DEFAULT)
.build(),
SystemDefaultDnsResolver.INSTANCE))
.register(StandardAuthScheme.KERBEROS, KerberosSchemeFactory.DEFAULT)
.build();