public class PasswordAuthenticator extends java.lang.Object implements IAuthenticator
Modifier and Type | Class and Description |
---|---|
static interface |
PasswordAuthenticator.CredentialsCacheMBean |
IAuthenticator.SaslNegotiator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PASSWORD_KEY |
static java.lang.String |
USERNAME_KEY |
Constructor and Description |
---|
PasswordAuthenticator() |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
checkpw(java.lang.String password,
java.lang.String hash) |
AuthenticatedUser |
legacyAuthenticate(java.util.Map<java.lang.String,java.lang.String> credentials)
A legacy method that is still used by JMX authentication.
|
IAuthenticator.SaslNegotiator |
newSaslNegotiator(java.net.InetAddress clientAddress)
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).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
newSaslNegotiator
public static final java.lang.String USERNAME_KEY
public static final java.lang.String PASSWORD_KEY
public boolean requireAuthentication()
IAuthenticator
requireAuthentication
in interface IAuthenticator
protected static boolean checkpw(java.lang.String password, java.lang.String hash)
public java.util.Set<DataResource> protectedResources()
IAuthenticator
protectedResources
in interface IAuthenticator
public void validateConfiguration() throws ConfigurationException
IAuthenticator
validateConfiguration
in interface IAuthenticator
ConfigurationException
- when there is a configuration error.public void setup()
IAuthenticator
setup
in interface IAuthenticator
public AuthenticatedUser legacyAuthenticate(java.util.Map<java.lang.String,java.lang.String> credentials) throws AuthenticationException
IAuthenticator
legacyAuthenticate
in interface IAuthenticator
credentials
- implementation specific key/value pairsAuthenticationException
public IAuthenticator.SaslNegotiator newSaslNegotiator(java.net.InetAddress clientAddress)
IAuthenticator
newSaslNegotiator
in interface IAuthenticator
clientAddress
- the IP address of the client whom we wish to authenticate, or null
if an internal client (one not connected over the remote transport).PasswordAuthenticator.PlainTextSaslAuthenticator
)Copyright © 2009-2020 The Apache Software Foundation