org.romaframework.module.users
Class LdapAuthentication
java.lang.Object
org.romaframework.core.config.Configurable<T>
org.romaframework.core.module.SelfRegistrantConfigurableModule<java.lang.String>
org.romaframework.aspect.authentication.AuthenticationAspectAbstract
org.romaframework.module.users.UsersAuthentication
org.romaframework.module.users.LdapAuthentication
- All Implemented Interfaces:
- org.romaframework.aspect.authentication.AuthenticationAspect, org.romaframework.aspect.authentication.UserObjectPermissionListener, org.romaframework.aspect.session.SessionListener, org.romaframework.core.aspect.Aspect, org.romaframework.core.config.Serviceable, org.romaframework.core.flow.SchemaFieldListener, org.romaframework.core.module.Module
public class LdapAuthentication
- extends UsersAuthentication
LDAP implementation of the authentication aspect. Allows to use an LDAP (or ActiveDirectory) server for authentication.
To replace the default implementation of AuthenticationAspect with this implementation you have to modify
"applicationContext-core.xml" and replace the bean named "AuthenticationAspect" with the following:
<bean id="AuthenticationAspect" class="org.romaframework.module.users.LdapAuthentication" singleton="true">
<property name="domain" value="<domain-name>" />
<property name="ldapHost" value="ldap://<host-name>" />
<property name="searchBase" value="your AD root, e.g. dc=mydomain,dc=org" />
<property name="singleSessionPerUser" value="false" />
<property name="accountBinder">
<bean class="org.romaframework.module.users.SimpleAccountBinder"/>
<!-- override this for a new strategy of binding an LDAP account to a BaseAccount -->
</property>
</bean>
- Author:
- Luigi Dell'Aquila
| Nested classes/interfaces inherited from interface org.romaframework.core.flow.SchemaFieldListener |
org.romaframework.core.flow.SchemaFieldListener.IgnoredExecution |
| Fields inherited from class org.romaframework.aspect.authentication.AuthenticationAspectAbstract |
DEF_ALGORITHM |
| Fields inherited from class org.romaframework.core.config.Configurable |
DEFAULT_CONFIG |
| Fields inherited from interface org.romaframework.core.flow.SchemaFieldListener |
IGNORED |
| Fields inherited from interface org.romaframework.aspect.authentication.AuthenticationAspect |
ASPECT_NAME |
| Fields inherited from interface org.romaframework.core.config.Serviceable |
STATUS_DOWN, STATUS_SHUTDOWNING, STATUS_STARTING, STATUS_UNKNOWN, STATUS_UP |
| Methods inherited from class org.romaframework.module.users.UsersAuthentication |
allow, allowAction, allowClass, allowEvent, allowField, checkPassword, getCurrentProfile, isSingleSessionPerUser, logout, onAfterFieldRead, onAfterFieldWrite, onBeforeFieldRead, onBeforeFieldWrite, onSessionCreating, onSessionDestroying, setSingleSessionPerUser, startup |
| Methods inherited from class org.romaframework.aspect.authentication.AuthenticationAspectAbstract |
aspectName, beginConfigClass, configAction, configClass, configEvent, configField, encryptPassword, encryptPasswordInBytes, endConfigClass, getCurrentAccount, getEncryptionAlgorithm, getUnderlyingComponent, setEncryptionAlgorithm |
| Methods inherited from class org.romaframework.core.module.SelfRegistrantConfigurableModule |
getStatus, moduleName, showConfiguration, shutdown |
| Methods inherited from class org.romaframework.core.config.Configurable |
addConfiguration, addConfiguration, getConfiguration, getConfigurationValues, setConfiguration |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LdapAuthentication
public LdapAuthentication()
authenticate
public java.lang.Object authenticate(java.lang.String iUserName,
java.lang.String iUserPasswd,
java.util.Map<java.lang.String,java.lang.String> iParameters)
throws org.romaframework.aspect.authentication.AuthenticationException
- Specified by:
authenticate in interface org.romaframework.aspect.authentication.AuthenticationAspect- Overrides:
authenticate in class UsersAuthentication
- Throws:
org.romaframework.aspect.authentication.AuthenticationException
getAccountBinder
public AccountBinder getAccountBinder()
setAccountBinder
public void setAccountBinder(AccountBinder accountBinder)
getDomain
public java.lang.String getDomain()
setDomain
public void setDomain(java.lang.String domain)
getLdapHost
public java.lang.String getLdapHost()
setLdapHost
public void setLdapHost(java.lang.String ldapHost)
getSearchBase
public java.lang.String getSearchBase()
setSearchBase
public void setSearchBase(java.lang.String searchBase)
getReturnedAttributes
public java.util.List<java.lang.String> getReturnedAttributes()
setReturnedAttributes
public void setReturnedAttributes(java.util.List<java.lang.String> returnedAttributes)
getNonLdapUsers
public java.util.List<java.lang.String> getNonLdapUsers()
setNonLdapUsers
public void setNonLdapUsers(java.util.List<java.lang.String> nonLdapUsers)