public class LdapUserAuthenticator extends java.lang.Object implements Authenticator
Authenticator
that uses LDAP.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LDAP_BASEDN_NAME |
static java.lang.String |
LDAP_SERVER_NAME |
static java.lang.String |
LDAP_SSL_NAME |
Constructor and Description |
---|
LdapUserAuthenticator() |
Modifier and Type | Method and Description |
---|---|
java.security.Principal |
authenticate(java.util.Properties credentials,
DistributedMember member)
Verify the credentials provided in the properties for the client/peer as specified in member ID
and returns the principal associated with the client/peer.
|
void |
close()
Called when the region containing this callback is closed or destroyed, when the cache is
closed, or when a callback is removed from a region using an
AttributesMutator . |
static Authenticator |
create() |
void |
init(java.util.Properties securityProps,
LogWriter systemLogWriter,
LogWriter securityLogWriter)
Initialize the callback for a client/peer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authenticate, init
initialize
public static final java.lang.String LDAP_SERVER_NAME
public static final java.lang.String LDAP_BASEDN_NAME
public static final java.lang.String LDAP_SSL_NAME
public static Authenticator create()
public void init(java.util.Properties securityProps, LogWriter systemLogWriter, LogWriter securityLogWriter) throws AuthenticationFailedException
Authenticator
init
in interface Authenticator
securityProps
- the security properties obtained using a call to
DistributedSystem.getSecurityProperties()
systemLogWriter
- LogWriter
for system logssecurityLogWriter
- LogWriter
for security logsAuthenticationFailedException
- if some exception occurs during the initializationpublic java.security.Principal authenticate(java.util.Properties credentials, DistributedMember member)
Authenticator
authenticate
in interface Authenticator
credentials
- the credentials of the client/peer as a set of property key/valuesmember
- the DistributedMember
object of the connecting client/peer member. NULL
when invoked locally on the member initiating the authentication request.public void close()
CacheCallback
AttributesMutator
.
Implementations should cleanup any external resources such as database connections. Any runtime exceptions this method throws will be logged.
It is possible for this method to be called multiple times on a single callback instance, so implementations must be tolerant of this.
close
in interface CacheCallback
RegionService.close()
,
Region.close()
,
Region.localDestroyRegion()
,
Region.destroyRegion()
,
AttributesMutator