public class PlainTextAuthProvider extends Object implements AuthProvider
AuthProvider
implementation.
This provider allows to programmatically define authentication information that will then apply to all hosts. The PlainTextAuthenticator instances it returns support SASL authentication using the PLAIN mechanism for version 2 of the CQL native protocol.
NONE
Constructor and Description |
---|
PlainTextAuthProvider(String username,
String password)
Creates a new simple authentication information provider with the
supplied credentials.
|
Modifier and Type | Method and Description |
---|---|
Authenticator |
newAuthenticator(InetSocketAddress host)
Uses the supplied credentials and the SASL PLAIN mechanism to login
to the server.
|
public Authenticator newAuthenticator(InetSocketAddress host)
newAuthenticator
in interface AuthProvider
host
- the Cassandra host with which we want to authenticateCopyright © 2012–2015. All rights reserved.