Skip to content

Commit

Permalink
rename SPNegoScheme to SpnegoScheme
Browse files Browse the repository at this point in the history
  • Loading branch information
stoty committed Sep 10, 2024
1 parent 4777477 commit 99bb75c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.client5.http.impl.DefaultAuthenticationStrategy;
import org.apache.hc.client5.http.impl.auth.CredentialsProviderBuilder;
import org.apache.hc.client5.http.impl.auth.SPNegoScheme;
import org.apache.hc.client5.http.impl.auth.SpnegoScheme;
import org.apache.hc.client5.http.protocol.HttpClientContext;
import org.apache.hc.client5.http.utils.Base64;
import org.apache.hc.client5.testing.extension.sync.ClientProtocolLevel;
Expand Down Expand Up @@ -78,11 +78,11 @@
import org.mockito.Mockito;

/**
* Tests for {@link SPNegoScheme}.
* Tests for {@link SpnegoScheme}.
*/
public class TestSPNegoScheme extends AbstractIntegrationTestBase {
public class TestSpnegoScheme extends AbstractIntegrationTestBase {

protected TestSPNegoScheme() {
protected TestSpnegoScheme() {
super(URIScheme.HTTP, ClientProtocolLevel.STANDARD);
}

Expand Down Expand Up @@ -191,7 +191,7 @@ public void handle(
* Kerberos configuration.
*
*/
private static class NegotiateSchemeWithMockGssManager extends SPNegoScheme {
private static class NegotiateSchemeWithMockGssManager extends SpnegoScheme {

final GSSManager manager = Mockito.mock(GSSManager.class);
final GSSName name = Mockito.mock(GSSName.class);
Expand All @@ -218,7 +218,7 @@ protected GSSManager getManager() {

}

private static class MutualNegotiateSchemeWithMockGssManager extends SPNegoScheme {
private static class MutualNegotiateSchemeWithMockGssManager extends SpnegoScheme {

final GSSManager manager = Mockito.mock(GSSManager.class);
final GSSName name = Mockito.mock(GSSName.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
* @since 4.2
*/
@Experimental
public class SPNegoScheme extends GSSchemeBase {
public class SpnegoScheme extends GSSchemeBase {

private static final String SPNEGO_OID = "1.3.6.1.5.5.2";

/**
* @since 5.0
*/
public SPNegoScheme(final org.apache.hc.client5.http.auth.KerberosConfig config, final DnsResolver dnsResolver) {
public SpnegoScheme(final org.apache.hc.client5.http.auth.KerberosConfig config, final DnsResolver dnsResolver) {
super(config, dnsResolver);
}

public SPNegoScheme() {
public SpnegoScheme() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,22 @@

/**
* {@link AuthSchemeFactory} implementation that creates and initializes
* {@link SPNegoScheme} instances.
* {@link SpnegoScheme} instances.
* <p>
* Please note this class is considered experimental and may be discontinued or removed
* in the future.
* </p>
*
* @since 4.2
*
* @deprecated Do not use. The GGS based experimental authentication schemes are no longer
* supported. Consider using Basic or Bearer authentication with TLS instead.
*
* @see BasicSchemeFactory
* @see BearerSchemeFactory
*/
@Deprecated
@Contract(threading = ThreadingBehavior.STATELESS)
@Experimental
public class SPNegoSchemeFactory implements AuthSchemeFactory {
public class SpnegoSchemeFactory implements AuthSchemeFactory {

/**
* Singleton instance for the default configuration.
*/
public static final SPNegoSchemeFactory DEFAULT = new SPNegoSchemeFactory(org.apache.hc.client5.http.auth.KerberosConfig.DEFAULT,
public static final SpnegoSchemeFactory DEFAULT = new SpnegoSchemeFactory(org.apache.hc.client5.http.auth.KerberosConfig.DEFAULT,
SystemDefaultDnsResolver.INSTANCE);

private final org.apache.hc.client5.http.auth.KerberosConfig config;
Expand All @@ -68,15 +61,15 @@ public class SPNegoSchemeFactory implements AuthSchemeFactory {
/**
* @since 5.0
*/
public SPNegoSchemeFactory(final org.apache.hc.client5.http.auth.KerberosConfig config, final DnsResolver dnsResolver) {
public SpnegoSchemeFactory(final org.apache.hc.client5.http.auth.KerberosConfig config, final DnsResolver dnsResolver) {
super();
this.config = config;
this.dnsResolver = dnsResolver;
}

@Override
public AuthScheme create(final HttpContext context) {
return new SPNegoScheme(this.config, this.dnsResolver);
return new SpnegoScheme(this.config, this.dnsResolver);
}

}

0 comments on commit 99bb75c

Please sign in to comment.