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
AuthenticationModule
init
in interface AuthenticationModule
params
- Configuration parameters for the moduledb
- The db that this module is bound toConfigurationException
public AuthenticationSession login(java.lang.String user, java.lang.Object credentials) throws AuthenticationException
AuthenticationModule
login
in interface AuthenticationModule
user
- The usercredentials
- The users credentials, f.e. a passwordAuthenticationException
- If the login cannot be verifiedpublic void clearCache()
AuthenticationModule
clearCache
in interface AuthenticationModule
public java.lang.String getAuthenticationSource()
AuthenticationModule
getAuthenticationSource
in interface AuthenticationModule
public java.lang.String getEMailAddress(java.lang.String user)
AuthenticationModule
getEMailAddress
in interface AuthenticationModule
user
- The userpublic boolean isPoolable()
public void addAuthenticationSourceListener(AuthenticationSourceListener listener)
AuthenticationModule
addAuthenticationSourceListener
in interface AuthenticationModule
public void removeAuthenticationSourceListener(AuthenticationSourceListener listener)
AuthenticationModule
removeAuthenticationSourceListener
in interface AuthenticationModule
public java.lang.Class[] getAllowedCredentialClasses()
AuthenticationModule
getAllowedCredentialClasses
in interface AuthenticationModule
public boolean isQueryable(java.lang.String queryType)
AuthenticationModule
isQueryable
in interface AuthenticationModule
public java.lang.Object query(java.lang.Object query, java.lang.String queryType)
AuthenticationModule
List
of UserGroupInfo
objects,
so the result can be processed in a platform independent manner.
Use constants QUERY_... to specify query type.query
in interface AuthenticationModule
public void destroy()
AuthenticationModule
destroy
in interface AuthenticationModule
public boolean isGeneratesSessionToken()
AuthenticationModule
isGeneratesSessionToken
in interface AuthenticationModule
public void dropPasswordCache(java.lang.String loginName)
PasswordCachingAuthenticationModule
dropPasswordCache
in interface PasswordCachingAuthenticationModule