jrun.security
Class JDBCLoginModule

jrun.security.JDBCLoginModule

public class JDBCLoginModule


Field Summary
protected  java.lang.String loginMode
           
 
Constructor Summary
JDBCLoginModule()
           
 
Method Summary
 boolean abort()
           This method is called if the LoginContext's overall authentication failed.
 boolean commit()
           
protected  void connCleanup(java.sql.PreparedStatement ps, java.sql.Connection conn)
           
protected  java.lang.String getUserPassword()
           
protected  java.util.ArrayList getUserRoles()
           
 void initialize(javax.security.auth.Subject subj, javax.security.auth.callback.CallbackHandler cbh, java.util.Map sharedState, java.util.Map options)
           
 boolean login()
           
protected  boolean loginUser()
           
 boolean logout()
          Logout the user.
protected  boolean validateRole()
           
 

Field Detail

loginMode

protected java.lang.String loginMode
Constructor Detail

JDBCLoginModule

public JDBCLoginModule()
Method Detail

initialize

public void initialize(javax.security.auth.Subject subj,
                       javax.security.auth.callback.CallbackHandler cbh,
                       java.util.Map sharedState,
                       java.util.Map options)

login

public boolean login()
              throws javax.security.auth.login.LoginException

loginUser

protected boolean loginUser()
                     throws javax.security.auth.login.LoginException

validateRole

protected boolean validateRole()
                        throws javax.security.auth.login.LoginException

getUserPassword

protected java.lang.String getUserPassword()
                                    throws javax.security.auth.login.LoginException

getUserRoles

protected java.util.ArrayList getUserRoles()
                                    throws javax.security.auth.login.LoginException

connCleanup

protected void connCleanup(java.sql.PreparedStatement ps,
                           java.sql.Connection conn)

commit

public boolean commit()
               throws javax.security.auth.login.LoginException

abort

public boolean abort()
              throws javax.security.auth.login.LoginException

This method is called if the LoginContext's overall authentication failed. (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed).

If this LoginModule's own authentication attempt succeeded (checked by retrieving the private state saved by the login and commit methods), then this method cleans up any state that was originally saved.

Returns:
false if this LoginModule's own login and/or commit attempts failed, and true otherwise.
Throws:
LoginException - if the abort fails.

logout

public boolean logout()
               throws javax.security.auth.login.LoginException
Logout the user.

This method removes the SamplePrincipal that was added by the commit method.

Returns:
true in all cases since this LoginModule should not be ignored.
Throws:
LoginException - if the logout fails.


Copyright � 2002 Macromedia Corporation. All Rights Reserved.