public class PasswordAuthenticator extends java.lang.Object implements IAuthenticator
IAuthenticator.SaslNegotiator| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LEGACY_CREDENTIALS_TABLE |
static java.lang.String |
PASSWORD_KEY |
static java.lang.String |
USERNAME_KEY |
| Constructor and Description |
|---|
PasswordAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
AuthenticatedUser |
legacyAuthenticate(java.util.Map<java.lang.String,java.lang.String> credentials)
For implementations which support the Thrift login method that accepts arbitrary
key/value pairs containing credentials data.
|
IAuthenticator.SaslNegotiator |
newSaslNegotiator()
Provide a SASL handler to perform authentication for an single connection.
|
java.util.Set<DataResource> |
protectedResources()
Set of resources that should be made inaccessible to users and only accessible internally.
|
boolean |
requireAuthentication()
Whether or not the authenticator requires explicit login.
|
void |
setup()
Setup is called once upon system startup to initialize the IAuthenticator.
|
void |
validateConfiguration()
Validates configuration of IAuthenticator implementation (if configurable).
|
public static final java.lang.String USERNAME_KEY
public static final java.lang.String PASSWORD_KEY
public static final java.lang.String LEGACY_CREDENTIALS_TABLE
public boolean requireAuthentication()
IAuthenticatorrequireAuthentication in interface IAuthenticatorpublic java.util.Set<DataResource> protectedResources()
IAuthenticatorprotectedResources in interface IAuthenticatorpublic void validateConfiguration()
throws ConfigurationException
IAuthenticatorvalidateConfiguration in interface IAuthenticatorConfigurationException - when there is a configuration error.public void setup()
IAuthenticatorsetup in interface IAuthenticatorpublic AuthenticatedUser legacyAuthenticate(java.util.Map<java.lang.String,java.lang.String> credentials) throws AuthenticationException
IAuthenticatorCredentialsMessage
Implementations where support for Thrift and CQL protocol v1 is not required should make
this an unsupported operation.
Should never return null - always throw AuthenticationException instead.
Returning AuthenticatedUser.ANONYMOUS_USER is an option as well if authentication is not required.legacyAuthenticate in interface IAuthenticatorcredentials - implementation specific key/value pairsAuthenticationExceptionpublic IAuthenticator.SaslNegotiator newSaslNegotiator()
IAuthenticatornewSaslNegotiator in interface IAuthenticatorPasswordAuthenticator.PlainTextSaslAuthenticator)Copyright © 2015 The Apache Software Foundation