com.ecyrd.jspwiki.auth.login
Class UserDatabaseLoginModule
java.lang.Object
com.ecyrd.jspwiki.auth.login.AbstractLoginModule
com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule
- All Implemented Interfaces:
- LoginModule
public class UserDatabaseLoginModule
- extends AbstractLoginModule
Logs in a user based on a username, password, and static password file
location. This module must be used with a CallbackHandler (such as
WikiCallbackHandler
) that supports the following Callback types:
NameCallback
- supplies the
username
PasswordCallback
- supplies the
password
UserDatabaseCallback
- supplies the
UserDatabase
After authentication, Principals based on the login name, full name, and wiki
name will be created and associated with the Subject, as returned by
UserDatabase.getPrincipals(String)
.
Also, principals Role.ALL
and
Role.AUTHENTICATED
will be added to
the Subject's principal set.
- Since:
- 2.3
- Version:
- $Revision: 1.4 $ $Date: 2005/11/08 18:27:51 $
- Author:
- Andrew Jaquith
Field Summary |
protected static org.apache.log4j.Logger |
log
|
Method Summary |
boolean |
login()
Logs in the user by calling back to the registered CallbackHandler with a
series of callbacks. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.log4j.Logger log
UserDatabaseLoginModule
public UserDatabaseLoginModule()
login
public boolean login()
throws LoginException
- Description copied from class:
AbstractLoginModule
- Logs in the user by calling back to the registered CallbackHandler with a
series of callbacks. If the login succeeds, this method returns
true
- Specified by:
login
in interface LoginModule
- Specified by:
login
in class AbstractLoginModule
- Returns:
true
if the commit succeeded, or
false
if this LoginModule should be ignored.
- Throws:
LoginException
- if the authentication fails- See Also:
LoginModule.login()