com.dotmarketing.auth.impl
Class ActiveDirectory2003
java.lang.Object
com.dotmarketing.auth.BaseAuthenticator
com.dotmarketing.auth.impl.ActiveDirectory2003
- All Implemented Interfaces:
- com.liferay.portal.auth.Authenticator
public class ActiveDirectory2003
- extends BaseAuthenticator
ActiveDirectory2003 class will authenticate against 2003, load groups, and load basic attributes into the dotcms.
You are expected to config the following properties in the portal-ext.properties to use this class.
auth.impl.ldap.initial.context.factory=com.sun.jndi.ldap.LdapCtxFactory
auth.impl.ldap.security.authentication=none
auth.impl.ldap.host=10.1.1.22
auth.impl.ldap.port=389
auth.impl.ldap.userid=Administrator
auth.impl.ldap.password=password
auth.impl.ldap.domainlookup=dc=liferay,dc=com
auth.impl.build.groups=true
auth.impl.ldap.build.group.name.filter=regex
- Author:
- jtesser
| Fields inherited from class com.dotmarketing.auth.BaseAuthenticator |
DOMAINLOOKUP, EMAIL_ATTRIB, FIRST_NAME_ATTRIB, GENDER_ATTRIB, GROUP_ATTRIB, GROUP_FILTER, GROUP_STRING_TO_STRIP, HOST, INITIAL_CONTEXT_FACTORY, IS_BUILD_GROUPS, LAST_NAME_ATTRIB, LDAP_USER_ROLE, MIDDLE_NAME_ATTRIB, NICKNAME_ATTRIB, PASSWORD, PORT, SECURITY_AUTHENTICATION, SECURITY_KEYSTORE_PATH, SYNC_PASSWORD, USER_ATTRIB, USERID |
| Fields inherited from interface com.liferay.portal.auth.Authenticator |
DNE, FAILURE, SUCCESS |
|
Method Summary |
boolean |
authenticate(java.lang.String username,
java.lang.String password)
Return true/false based on user credentials |
UserAttribute |
loadAttributes(java.lang.String username,
java.lang.String pass)
Expose this method if you want to sync user attributes to the dotcms. |
java.util.ArrayList<java.lang.String> |
loadGroups(java.lang.String username,
java.lang.String pass)
Expose this method if you wish to sync groups from the directory service to the dotcms. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActiveDirectory2003
public ActiveDirectory2003()
authenticate
public boolean authenticate(java.lang.String username,
java.lang.String password)
throws com.liferay.portal.NoSuchUserException
- Description copied from class:
BaseAuthenticator
- Return true/false based on user credentials
- Specified by:
authenticate in class BaseAuthenticator
- Parameters:
username - The username to authenticatepassword - The password for the user to authenticate
- Returns:
-
- Throws:
com.liferay.portal.NoSuchUserException
loadAttributes
public UserAttribute loadAttributes(java.lang.String username,
java.lang.String pass)
- Description copied from class:
BaseAuthenticator
- Expose this method if you want to sync user attributes to the dotcms. You can set
first name, middle name, last name nickname, email, gender, birthday, multiple addresses,
and any attribute in the user_proxy table. If you do not want to sync attributes have the
concrete class return this method as null.
- Specified by:
loadAttributes in class BaseAuthenticator
- Parameters:
username - the username in the directory service to load attributes for
- Returns:
- UserAttribute
loadGroups
public java.util.ArrayList<java.lang.String> loadGroups(java.lang.String username,
java.lang.String pass)
- Description copied from class:
BaseAuthenticator
- Expose this method if you wish to sync groups from the directory service to the dotcms.
If you do not want to sync attributes have the concrete class return this method as null.
- Specified by:
loadGroups in class BaseAuthenticator
- Parameters:
username - the username in the directory service to load attributes for
- Returns:
- ArrayList of a user's groups.
Copyright © 2009 Dotmarketing, Inc. All Rights Reserved.