Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » security » auth » spi » [javadoc | source]
org.jboss.security.auth.spi
public class: DatabaseServerLoginModule [javadoc | source]
java.lang.Object
   org.jboss.security.auth.spi.AbstractServerLoginModule
      org.jboss.security.auth.spi.UsernamePasswordLoginModule
         org.jboss.security.auth.spi.DatabaseServerLoginModule

All Implemented Interfaces:
    LoginModule

A JDBC based login module that supports authentication and role mapping. It is based on two logical tables:

LoginModule options:

Fields inherited from org.jboss.security.auth.spi.AbstractServerLoginModule:
subject,  callbackHandler,  sharedState,  options,  log,  useFirstPass,  loginOk
Method from org.jboss.security.auth.spi.DatabaseServerLoginModule Summary:
convertRawPassword,   getRoleSets,   getUsersPassword,   initialize
Methods from org.jboss.security.auth.spi.UsernamePasswordLoginModule:
createPasswordHash,   getCredentials,   getIdentity,   getUnauthenticatedIdentity,   getUsername,   getUsernameAndPassword,   getUsersPassword,   initialize,   login,   validatePassword
Methods from org.jboss.security.auth.spi.AbstractServerLoginModule:
abort,   commit,   createGroup,   getIdentity,   getRoleSets,   getUseFirstPass,   initialize,   login,   logout
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.security.auth.spi.DatabaseServerLoginModule Detail:
 protected String convertRawPassword(String rawPassword) 
    A hook to allow subclasses to convert a password from the database into a plain text string or whatever form is used for matching against the user input. It is called from within the getUsersPassword() method.
 protected Group[] getRoleSets() throws LoginException 
    Overriden by subclasses to return the Groups that correspond to the to the role sets assigned to the user. Subclasses should create at least a Group named "Roles" that contains the roles assigned to the user. A second common group is "CallerPrincipal" that provides the application identity of the user rather than the security domain identity.
 protected String getUsersPassword() throws LoginException 
    Get the expected password for the current username available via the getUsername() method. This is called from within the login() method after the CallbackHandler has returned the username and candidate password.
 public  void initialize(Subject subject,
    CallbackHandler callbackHandler,
    Map sharedState,
    Map options) 
    Initialize this LoginModule.