public class FileAuthenticationModule extends java.lang.Object implements AuthenticationModule, PasswordCachingAuthenticationModule
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AUTH_FILE
Creation option to specify the XML config file location.
|
static java.lang.String |
AUTHMODULE_KEY |
static org.apache.log4j.Logger |
LOG |
static java.lang.String |
SYSPROPERTY_AUTH_FOLDER
Sysproperty to specify a base path for XML config files.
|
QUERY_USER_DN, QUERY_USERS_AND_GROUPS, USERLABEL_COMMONNAME| Constructor and Description |
|---|
FileAuthenticationModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthenticationSourceListener(AuthenticationSourceListener listener)
Method to add a listener to authentication source events.
|
void |
clearCache()
Called to notify the module to drop authentication caches (if it uses them)
|
void |
destroy()
Called when an auth module is no longer needed.
|
void |
dropPasswordCache(java.lang.String loginName)
Tells the authentication module to drop the password cache for the given login name.
|
java.lang.Class[] |
getAllowedCredentialClasses()
Returns the classes that are allowed as credentials for this module
|
java.lang.String |
getAuthenticationSource()
Descriptive string representation of the used authentication source
|
java.lang.String |
getEMailAddress(java.lang.String user)
Tries to retrieve the E-Mail-Address of the given user.
|
void |
init(java.util.Map params,
WGDatabase db)
Called when the Authentication module is created, providing additional information
|
boolean |
isGeneratesSessionToken()
Determines if this auth module can create a session token that can be used for some kind of
single sign-on architecture.
|
boolean |
isPoolable() |
boolean |
isQueryable(java.lang.String queryType)
Determines, if this auth module supports queries of the given query type.
|
AuthenticationSession |
login(java.lang.String user,
java.lang.Object credentials)
Called to verify a login.
|
java.lang.Object |
query(java.lang.Object query,
java.lang.String queryType)
executes a query for authentication objects (users, groups etc.) and returns the result.
|
void |
removeAuthenticationSourceListener(AuthenticationSourceListener listener)
Removes an authentication source listener from the list of listeners
|
public static final java.lang.String AUTHMODULE_KEY
public static final org.apache.log4j.Logger LOG
public static final java.lang.String SYSPROPERTY_AUTH_FOLDER
public static final java.lang.String AUTH_FILE
public void init(java.util.Map params,
WGDatabase db)
throws ConfigurationException
AuthenticationModuleinit in interface AuthenticationModuleparams - Configuration parameters for the moduledb - The db that this module is bound toConfigurationExceptionpublic AuthenticationSession login(java.lang.String user, java.lang.Object credentials) throws AuthenticationException
AuthenticationModulelogin in interface AuthenticationModuleuser - The usercredentials - The users credentials, f.e. a passwordAuthenticationException - If the login cannot be verifiedpublic void clearCache()
AuthenticationModuleclearCache in interface AuthenticationModulepublic java.lang.String getAuthenticationSource()
AuthenticationModulegetAuthenticationSource in interface AuthenticationModulepublic java.lang.String getEMailAddress(java.lang.String user)
AuthenticationModulegetEMailAddress in interface AuthenticationModuleuser - The userpublic boolean isPoolable()
public void addAuthenticationSourceListener(AuthenticationSourceListener listener)
AuthenticationModuleaddAuthenticationSourceListener in interface AuthenticationModulepublic void removeAuthenticationSourceListener(AuthenticationSourceListener listener)
AuthenticationModuleremoveAuthenticationSourceListener in interface AuthenticationModulepublic java.lang.Class[] getAllowedCredentialClasses()
AuthenticationModulegetAllowedCredentialClasses in interface AuthenticationModulepublic boolean isQueryable(java.lang.String queryType)
AuthenticationModuleisQueryable in interface AuthenticationModulepublic java.lang.Object query(java.lang.Object query,
java.lang.String queryType)
AuthenticationModuleList of UserGroupInfo objects,
so the result can be processed in a platform independent manner.
Use constants QUERY_... to specify query type.query in interface AuthenticationModulepublic void destroy()
AuthenticationModuledestroy in interface AuthenticationModulepublic boolean isGeneratesSessionToken()
AuthenticationModuleisGeneratesSessionToken in interface AuthenticationModulepublic void dropPasswordCache(java.lang.String loginName)
PasswordCachingAuthenticationModuledropPasswordCache in interface PasswordCachingAuthenticationModule