Package org.apache.wiki.auth.login
Class UserDatabaseLoginModule
- java.lang.Object
-
- org.apache.wiki.auth.login.AbstractLoginModule
-
- org.apache.wiki.auth.login.UserDatabaseLoginModule
-
- All Implemented Interfaces:
javax.security.auth.spi.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 usernamePasswordCallback
- supplies the passwordUserDatabaseCallback
- supplies theUserDatabase
After authentication, a Principals based on the login name will be created and associated with the Subject.
- Since:
- 2.3
-
-
Field Summary
-
Fields inherited from class org.apache.wiki.auth.login.AbstractLoginModule
m_handler, m_options, m_principals, m_state, m_subject, NULL
-
-
Constructor Summary
Constructors Constructor Description UserDatabaseLoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
login()
Logs in the user by calling back to the registered CallbackHandler with a series of callbacks.-
Methods inherited from class org.apache.wiki.auth.login.AbstractLoginModule
abort, commit, initialize, logout
-
-
-
-
Constructor Detail
-
UserDatabaseLoginModule
public UserDatabaseLoginModule()
-
-
Method Detail
-
login
public boolean login() throws javax.security.auth.login.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 returnstrue
- Specified by:
login
in interfacejavax.security.auth.spi.LoginModule
- Specified by:
login
in classAbstractLoginModule
- Returns:
true
if the commit succeeded, orfalse
if this LoginModule should be ignored.- Throws:
javax.security.auth.login.LoginException
- if the authentication fails- See Also:
LoginModule.login()
-
-