public interface AuthenticationCache
Interface for a cache of the authentication information.
Implementations should provide a public constructor with
one argument of type Properties. The property object
passed at construction contains the same properties that were
passed to flexible JDBC realm. This allows users of a cache to
configure a cache through the standard Glassfish security realm
configuration.
Implementations should implement toString() to print a meaningful description of the cache for logging.
This interface is very similar to the AuthenticationRepository
but is slightly different because it gets cached data and does not 'find' it.
Also the contract differs in that it may return null and it has
method for putting things into it.
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getGroups(String aUsername)
Gets the groups a user belongs to from the cache.
|
String |
getPassword(String aUsername)
Gets the cached password for a given user.
|
String |
getSeed(String aUsername)
Gets a cached seed for a given username based on the configured sql seed query.
|
void |
setGroups(String aUsername,
List<String> aGroups)
Sets the groups for a given user.
|
void |
setPassword(String aUserName,
String aPassword)
Sets the cached password for a user.
|
void |
setSeed(String aUsername,
String aSeed)
Sets the seed.
|
String getPassword(String aUsername)
aUsername - Username.void setPassword(String aUserName, String aPassword)
aUserName - Username.aPassword - Password.List<String> getGroups(String aUsername)
aUsername - User.void setGroups(String aUsername, List<String> aGroups)
aUsername - User name.aGroups - Groups (must be non-null).String getSeed(String aUsername)
aUsername - Username.Copyright © 2019. All rights reserved.