public class SimpleAuthenticator extends java.lang.Object implements Authenticator
Authenticator, mirroring
the structure of SimpleSecurityManager. Authenticates a user
when the username matches the password, which in turn will match the user's permissions in
SimpleAccessController.| Constructor and Description |
|---|
SimpleAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
java.security.Principal |
authenticate(java.util.Properties props,
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 systemLogger,
LogWriter securityLogger)
Initialize the callback for a client/peer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitauthenticate, initinitializepublic void init(java.util.Properties securityProps,
LogWriter systemLogger,
LogWriter securityLogger)
throws AuthenticationFailedException
Authenticatorinit in interface AuthenticatorsecurityProps - the security properties obtained using a call to
DistributedSystem.getSecurityProperties()systemLogger - LogWriter for system logssecurityLogger - LogWriter for security logsAuthenticationFailedException - if some exception occurs during the initializationpublic static Authenticator create()
public java.security.Principal authenticate(java.util.Properties props,
DistributedMember member)
throws AuthenticationFailedException
Authenticatorauthenticate in interface Authenticatorprops - 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.AuthenticationFailedException - If the authentication of the client/peer fails.public void close()
CacheCallbackAttributesMutator.
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 CacheCallbackRegionService.close(),
Region.close(),
Region.localDestroyRegion(),
Region.destroyRegion(),
AttributesMutator