| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.security.impl.DefaultLoginModule
public class DefaultLoginModule
LoginModule implementation that authenticates a user against a relational database. OJB based implementation.
When a user is successfully authenticated, the user principal are added to the current subject.
The LoginModule also recognizes the debug option.
Configuration files should provide:
 Jetspeed {
   org.apache.jetspeed.security.impl.DefaultLoginModule required debug=true;
 };
 
| Field Summary | |
|---|---|
| protected  CallbackHandler | callbackHandlerA CallbackHandler for communicating with the end user (prompting for usernames and passwords, for example). | 
| protected  boolean | commitSuccessThe commit status. | 
| protected  boolean | debugLoginModule debug mode is turned off by default. | 
| protected  Map | optionsOptions specified in the login Configuration for this particular LoginModule. | 
| protected  String | portalUserRoleThe portal user role. | 
| protected  Map | sharedStateState shared with other configured LoginModules. | 
| protected  Subject | subjectThe Subject to be authenticated. | 
| protected  boolean | successThe authentication status. | 
| protected  org.apache.jetspeed.security.UserManager | umsInternalUserPrincipal manager service. | 
| protected  String | usernameThe user name. | 
| Constructor Summary | |
|---|---|
|   | DefaultLoginModule()The default login module constructor. | 
| protected  | DefaultLoginModule(org.apache.jetspeed.security.UserManager userManager) | 
| protected  | DefaultLoginModule(org.apache.jetspeed.security.UserManager userManager,
                   String portalUserRole)Create a new login module that uses the given user manager. | 
| Method Summary | |
|---|---|
|  boolean | abort() | 
|  boolean | commit() | 
| protected  void | commitPrincipals(Subject subject,
                 org.apache.jetspeed.security.User user)Default setup of the logged on Subject Principals for Tomcat | 
| protected  Principal | getUserPrincipal(org.apache.jetspeed.security.User user) | 
| protected  List | getUserRoles(org.apache.jetspeed.security.User user) | 
|  void | initialize(Subject subject,
           CallbackHandler callbackHandler,
           Map sharedState,
           Map options) | 
|  boolean | login() | 
|  boolean | logout() | 
| protected  void | refreshProxy() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected boolean debug
LoginModule debug mode is turned off by default.
protected boolean success
The authentication status.
protected boolean commitSuccess
The commit status.
protected Subject subject
The Subject to be authenticated.
protected CallbackHandler callbackHandler
A CallbackHandler for communicating with the end user (prompting for usernames and passwords, for example).
protected Map sharedState
State shared with other configured LoginModules.
protected Map options
Options specified in the login Configuration for this particular LoginModule.
protected org.apache.jetspeed.security.UserManager ums
InternalUserPrincipal manager service.
protected String portalUserRole
protected String username
The user name.
| Constructor Detail | 
|---|
public DefaultLoginModule()
The default login module constructor.
protected DefaultLoginModule(org.apache.jetspeed.security.UserManager userManager,
                             String portalUserRole)
userManager - the user manager to useportalUserRole - the portal user role to useprotected DefaultLoginModule(org.apache.jetspeed.security.UserManager userManager)
| Method Detail | 
|---|
public boolean abort()
              throws LoginException
abort in interface LoginModuleLoginExceptionLoginModule.abort()protected void refreshProxy()
public boolean commit()
               throws LoginException
commit in interface LoginModuleLoginExceptionLoginModule.commit()
public boolean login()
              throws LoginException
login in interface LoginModuleLoginExceptionLoginModule.login()
public boolean logout()
               throws LoginException
logout in interface LoginModuleLoginExceptionLoginModule.logout()
public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map sharedState,
                       Map options)
initialize in interface LoginModuleLoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)protected Principal getUserPrincipal(org.apache.jetspeed.security.User user)
protected List getUserRoles(org.apache.jetspeed.security.User user)
protected void commitPrincipals(Subject subject,
                                org.apache.jetspeed.security.User user)
subject - user - | 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||