Package com.datastax.driver.core
Interface ExtendedAuthProvider
-
- All Superinterfaces:
AuthProvider
- All Known Implementing Classes:
ExtendedAuthProvider.NoAuthProvider,PlainTextAuthProvider
public interface ExtendedAuthProvider extends AuthProvider
An auth provider that represents the host as anEndPointinstead of a rawInetSocketAddress.This interface exists solely for backward compatibility: it wasn't possible to change
AuthProviderdirectly, because it would have broken every 3rd-party implementation.All built-in providers now implement this interface, and it is recommended that new implementations do too.
When the driver calls an auth provider, it will check if it implements this interface. If so, it will call
newAuthenticator(EndPoint, String); otherwise it will convert the endpoint into an address withEndPoint.resolve()and callAuthProvider.newAuthenticator(InetSocketAddress, String).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classExtendedAuthProvider.NoAuthProvider-
Nested classes/interfaces inherited from interface com.datastax.driver.core.AuthProvider
AuthProvider.TransitionalModePlainTextAuthenticator
-
-
Field Summary
-
Fields inherited from interface com.datastax.driver.core.AuthProvider
NONE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description AuthenticatornewAuthenticator(EndPoint endPoint, String authenticator)TheAuthenticatorto use when connecting toendpoint.AuthenticatornewAuthenticator(InetSocketAddress host, String authenticator)Deprecated.the driver will never call this method onExtendedAuthProviderinstances.
-
-
-
Method Detail
-
newAuthenticator
Authenticator newAuthenticator(EndPoint endPoint, String authenticator) throws AuthenticationException
TheAuthenticatorto use when connecting toendpoint.- Parameters:
endPoint- the Cassandra host to connect to.authenticator- the configured authenticator on the host.- Returns:
- The authentication implementation to use.
- Throws:
AuthenticationException
-
newAuthenticator
@Deprecated Authenticator newAuthenticator(InetSocketAddress host, String authenticator) throws AuthenticationException
Deprecated.the driver will never call this method onExtendedAuthProviderinstances. Implementors should throwAssertionError.Description copied from interface:AuthProviderTheAuthenticatorto use when connecting tohost- Specified by:
newAuthenticatorin interfaceAuthProvider- Parameters:
host- the Cassandra host to connect to.authenticator- the configured authenticator on the host.- Returns:
- The authentication implementation to use.
- Throws:
AuthenticationException
-
-