org.apache.wiki.auth.login
Class UserDatabaseLoginModule

java.lang.Object
  extended by org.apache.wiki.auth.login.AbstractLoginModule
      extended by org.apache.wiki.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:

  1. NameCallback- supplies the username
  2. PasswordCallback- supplies the password
  3. UserDatabaseCallback- supplies the UserDatabase

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_previousWikiPrincipals, m_principals, m_principalsToOverwrite, m_principalsToRemove, m_state, m_subject, NULL
 
Constructor Summary
UserDatabaseLoginModule()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDatabaseLoginModule

public UserDatabaseLoginModule()
Method Detail

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:
{@inheritDoc}


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.