Skip to content

Commit 5f27777

Browse files
author
Sylvain Lebresne
committed
Fix build of dse authenticator
1 parent 74204b3 commit 5f27777

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

driver-dse/src/main/java/com/datastax/driver/auth/DseAuthProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import com.datastax.driver.core.Authenticator;
2222
import com.datastax.driver.core.exceptions.AuthenticationException;
2323

24-
import java.net.InetAddress;
24+
import java.net.InetSocketAddress;
2525

2626
/**
2727
* AuthProvider which supplies authenticator instances for clients to connect t
@@ -85,7 +85,7 @@
8585
public class DseAuthProvider implements AuthProvider
8686
{
8787
@Override
88-
public Authenticator newAuthenticator(InetAddress host) throws AuthenticationException
88+
public Authenticator newAuthenticator(InetSocketAddress host) throws AuthenticationException
8989
{
9090
return new KerberosAuthenticator(host);
9191
}

driver-dse/src/main/java/com/datastax/driver/auth/KerberosAuthenticator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import javax.security.auth.Subject;
2525
import javax.security.auth.login.LoginContext;
2626
import javax.security.auth.login.LoginException;
27-
import java.net.InetAddress;
27+
import java.net.InetSocketAddress;
2828

2929
/**
3030
* Responsible for authenticating with secured DSE services using Kerberos
@@ -45,13 +45,13 @@ public class KerberosAuthenticator implements Authenticator
4545

4646
private final PrivilegedSaslClient saslClient;
4747

48-
public KerberosAuthenticator(InetAddress host)
48+
public KerberosAuthenticator(InetSocketAddress host)
4949
{
5050
saslClient = new PrivilegedSaslClient(loginSubject(),
5151
SUPPORTED_MECHANISMS,
5252
null,
5353
System.getProperty(SASL_PROTOCOL_NAME_PROPERTY, SASL_PROTOCOL_NAME),
54-
host.getCanonicalHostName(),
54+
host.getAddress().getCanonicalHostName(),
5555
PrivilegedSaslClient.DEFAULT_PROPERTIES,
5656
null);
5757
}

0 commit comments

Comments
 (0)