public interface ExtendedAuthProvider extends AuthProvider
EndPoint
instead of a raw InetSocketAddress
.
This interface exists solely for backward compatibility: it wasn't possible to change AuthProvider
directly, 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 with EndPoint.resolve()
and call AuthProvider.newAuthenticator(InetSocketAddress, String)
.
Modifier and Type | Interface and Description |
---|---|
static class |
ExtendedAuthProvider.NoAuthProvider |
AuthProvider.TransitionalModePlainTextAuthenticator
NONE
Modifier and Type | Method and Description |
---|---|
Authenticator |
newAuthenticator(EndPoint endPoint,
String authenticator)
The
Authenticator to use when connecting to endpoint . |
Authenticator |
newAuthenticator(InetSocketAddress host,
String authenticator)
Deprecated.
the driver will never call this method on
ExtendedAuthProvider instances.
Implementors should throw AssertionError . |
Authenticator newAuthenticator(EndPoint endPoint, String authenticator) throws AuthenticationException
Authenticator
to use when connecting to endpoint
.endPoint
- the Cassandra host to connect to.authenticator
- the configured authenticator on the host.AuthenticationException
@Deprecated Authenticator newAuthenticator(InetSocketAddress host, String authenticator) throws AuthenticationException
ExtendedAuthProvider
instances.
Implementors should throw AssertionError
.AuthProvider
Authenticator
to use when connecting to host
newAuthenticator
in interface AuthProvider
host
- the Cassandra host to connect to.authenticator
- the configured authenticator on the host.AuthenticationException
Copyright © 2012–2023. All rights reserved.