com.arsdigita.kernel.security
Class LocalLoginModule

java.lang.Object
  extended bycom.arsdigita.kernel.security.PasswordLoginModule
      extended bycom.arsdigita.kernel.security.LocalLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule

public class LocalLoginModule
extends PasswordLoginModule

Checks a username and password in the database using com.arsdigita.kernel.UserAuthentication.

Author:
Sameer Ajmani

Field Summary
static String versionId
           
 
Fields inherited from class com.arsdigita.kernel.security.PasswordLoginModule
NAME_KEY, PASSWORD_KEY
 
Constructor Summary
LocalLoginModule()
           
 
Method Summary
 boolean abort()
          Trivial implementation; does nothing.
protected  void checkPassword(String username, char[] password)
          Retrieves the user account from the database and checks the password against the saved value.
 boolean commit()
          Trivial implementation; does nothing.
 void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, Map shared, Map options)
           
 boolean logout()
          Trivial implementation; does nothing.
 
Methods inherited from class com.arsdigita.kernel.security.PasswordLoginModule
login
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

LocalLoginModule

public LocalLoginModule()
Method Detail

initialize

public void initialize(javax.security.auth.Subject subject,
                       javax.security.auth.callback.CallbackHandler handler,
                       Map shared,
                       Map options)
Specified by:
initialize in interface javax.security.auth.spi.LoginModule
Overrides:
initialize in class PasswordLoginModule

checkPassword

protected void checkPassword(String username,
                             char[] password)
                      throws javax.security.auth.login.LoginException
Retrieves the user account from the database and checks the password against the saved value.

Specified by:
checkPassword in class PasswordLoginModule
Parameters:
username - the username to check
password - the password to check
Throws:
AccountNotFoundException - if the account does not exist.
javax.security.auth.login.FailedLoginException - if the password is invalid.
javax.security.auth.login.LoginException - if an error occurs.

commit

public boolean commit()
               throws javax.security.auth.login.LoginException
Trivial implementation; does nothing.

Specified by:
commit in interface javax.security.auth.spi.LoginModule
Specified by:
commit in class PasswordLoginModule
Returns:
true.
Throws:
javax.security.auth.login.LoginException

abort

public boolean abort()
              throws javax.security.auth.login.LoginException
Trivial implementation; does nothing.

Specified by:
abort in interface javax.security.auth.spi.LoginModule
Specified by:
abort in class PasswordLoginModule
Returns:
true.
Throws:
javax.security.auth.login.LoginException

logout

public boolean logout()
               throws javax.security.auth.login.LoginException
Trivial implementation; does nothing.

Specified by:
logout in interface javax.security.auth.spi.LoginModule
Specified by:
logout in class PasswordLoginModule
Returns:
true.
Throws:
javax.security.auth.login.LoginException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC