org.jboss.portal.identity.auth
Class SynchronizingLoginModule
java.lang.Object
org.jboss.security.auth.spi.AbstractServerLoginModule
org.jboss.security.auth.spi.UsernamePasswordLoginModule
org.jboss.portal.identity.auth.SynchronizingLoginModule
- All Implemented Interfaces:
- javax.security.auth.spi.LoginModule
public class SynchronizingLoginModule
- extends org.jboss.security.auth.spi.UsernamePasswordLoginModule
- Version:
- $Revision: 0.1 $
- Author:
- Boleslaw Dawidowicz
Fields inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule |
callbackHandler, loginOk, options, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass |
Methods inherited from class org.jboss.security.auth.spi.UsernamePasswordLoginModule |
createPasswordHash, getCredentials, getIdentity, getUnauthenticatedIdentity, getUsername, getUsernameAndPassword, getValidateError, login, setValidateError |
Methods inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule |
abort, createGroup, getUseFirstPass, logout |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
additionalRole
protected java.lang.String additionalRole
defaultAssignedRole
protected java.lang.String defaultAssignedRole
synchronizeIdentity
protected java.lang.String synchronizeIdentity
synchronizeRoles
protected java.lang.String synchronizeRoles
userModuleJNDIName
protected java.lang.String userModuleJNDIName
roleModuleJNDIName
protected java.lang.String roleModuleJNDIName
membershipModuleJNDIName
protected java.lang.String membershipModuleJNDIName
userProfileModuleJNDIName
protected java.lang.String userProfileModuleJNDIName
SynchronizingLoginModule
public SynchronizingLoginModule()
initialize
public void initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
- Specified by:
initialize
in interface javax.security.auth.spi.LoginModule
- Overrides:
initialize
in class org.jboss.security.auth.spi.UsernamePasswordLoginModule
getUserModule
protected UserModule getUserModule()
throws java.lang.Exception
- Throws:
java.lang.Exception
getRoleModule
protected RoleModule getRoleModule()
throws java.lang.Exception
- Throws:
java.lang.Exception
getMembershipModule
protected MembershipModule getMembershipModule()
throws java.lang.Exception
- Throws:
java.lang.Exception
getUserProfileModule
protected UserProfileModule getUserProfileModule()
throws java.lang.Exception
- Throws:
java.lang.Exception
getUsersPassword
protected java.lang.String getUsersPassword()
throws javax.security.auth.login.LoginException
- We must implement this - just return "" - it's ok as we override validatePassword
- Specified by:
getUsersPassword
in class org.jboss.security.auth.spi.UsernamePasswordLoginModule
- Returns:
-
- Throws:
javax.security.auth.login.LoginException
validatePassword
protected boolean validatePassword(java.lang.String string,
java.lang.String string1)
- This always returns true - so this module always pass.
- Overrides:
validatePassword
in class org.jboss.security.auth.spi.UsernamePasswordLoginModule
- Parameters:
string
- string1
-
- Returns:
createIdentity
protected java.security.Principal createIdentity(java.lang.String username)
throws java.lang.Exception
- Subclass to use the PortalPrincipal to make the username easier to retrieve by the portal.
- Overrides:
createIdentity
in class org.jboss.security.auth.spi.AbstractServerLoginModule
- Throws:
java.lang.Exception
getRoleSets
protected java.security.acl.Group[] getRoleSets()
throws javax.security.auth.login.LoginException
- Specified by:
getRoleSets
in class org.jboss.security.auth.spi.AbstractServerLoginModule
- Throws:
javax.security.auth.login.LoginException
commit
public boolean commit()
throws javax.security.auth.login.LoginException
- Specified by:
commit
in interface javax.security.auth.spi.LoginModule
- Overrides:
commit
in class org.jboss.security.auth.spi.AbstractServerLoginModule
- Throws:
javax.security.auth.login.LoginException
isSynchronizeIdentity
protected boolean isSynchronizeIdentity()
isSynchronizeRoles
protected boolean isSynchronizeRoles()