Package org.codelibs.fess.ldap
Class LdapManager
java.lang.Object
org.codelibs.fess.ldap.LdapManager
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ThreadLocal<LdapManager.DirContextHolder>protected FessConfigprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddGroupAttributes(BasicAttributes entry, Group group) protected voidaddRoleAttributes(BasicAttributes entry, Role user) protected voidaddUserAttributes(BasicAttributes entry, User user) protected booleanallowEmptyGroupAndRole(LdapUser ldapUser) voidvoidbooleanchangePassword(String username, String password) createEnvironment(String initialContextFactory, String securityAuthentication, String providerUrl, String principal, String credntials) protected LdapUsercreateLdapUser(String username, Hashtable<String, String> env) createSearchEnv(String username, String password) protected voidvoidvoidvoidgetAttributeValueList(List<SearchResult> result, String name) protected LdapManager.DirContextHoldergetDirContext(Supplier<Hashtable<String, String>> envSupplier) String[]getRoles(LdapUser ldapUser, String bindDn, String accountFilter, String groupFilter, Consumer<String[]> lazyLoading) protected StringgetSearchRoleName(String entryDn) voidinit()protected voidvoidvoidvoidorg.dbflute.optional.OptionalEntity<FessUser>org.dbflute.optional.OptionalEntity<FessUser>protected voidmodify(String dn, List<ModificationItem> modifyList, Supplier<Hashtable<String, String>> envSupplier) protected voidmodifyAddEntry(List<ModificationItem> modifyList, String name, String value) protected voidmodifyDeleteEntry(List<ModificationItem> modifyList, String name, Object value) protected voidmodifyGroupAttributes(Group group, Supplier<Hashtable<String, String>> adminEnv, String entryDN, List<SearchResult> result) protected voidmodifyReplaceEntry(List<ModificationItem> modifyList, String name, String value) protected voidmodifyUserAttributes(User user, Supplier<Hashtable<String, String>> adminEnv, String userDN, List<SearchResult> result) protected voidprocessSearchRoles(List<SearchResult> result, BiConsumer<String, String> consumer) protected voidprocessSearchRoles(List<SearchResult> result, Consumer<String> consumer) protected voidprocessSubRoles(LdapUser ldapUser, String bindDn, Set<String> subRoleSet, String groupFilter, Set<String> roleSet) protected voidprotected StringreplaceWithUnderscores(String value) protected voidsearch(String baseDn, String filter, String[] returningAttrs, Supplier<Hashtable<String, String>> envSupplier, org.codelibs.fess.ldap.LdapManager.SearchConsumer consumer) protected voidsetAttributeValue(List<SearchResult> result, String name, Consumer<Object> consumer) voidprotected voidupdateSearchRoles(Set<String> roleSet, String entryDn) protected booleanvalidate()voidvoid
-
Field Details
-
contextLocal
-
isBind
protected volatile boolean isBind -
fessConfig
-
-
Constructor Details
-
LdapManager
public LdapManager()
-
-
Method Details
-
init
@PostConstruct public void init() -
createEnvironment
-
putEnv
-
createAdminEnv
-
createSearchEnv
-
createSearchEnv
-
updateConfig
public void updateConfig() -
validate
protected boolean validate() -
login
-
login
-
allowEmptyGroupAndRole
-
createLdapUser
-
getRoles
-
processSubRoles
-
updateSearchRoles
-
normalizePermissionName
-
processSearchRoles
protected void processSearchRoles(List<SearchResult> result, BiConsumer<String, String> consumer) throws NamingException- Throws:
NamingException
-
processSearchRoles
protected void processSearchRoles(List<SearchResult> result, Consumer<String> consumer) throws NamingException - Throws:
NamingException
-
getSearchRoleName
-
replaceWithUnderscores
-
setAttributeValue
-
getAttributeValueList
-
apply
-
insert
-
modifyUserAttributes
-
addUserAttributes
-
validateUserAttributes
-
delete
-
insert
-
addRoleAttributes
-
delete
-
apply
-
insert
-
modifyGroupAttributes
-
addGroupAttributes
-
validateGroupAttributes
-
delete
-
changePassword
-
insert
-
delete
-
search
-
modifyAddEntry
-
modifyReplaceEntry
-
modifyDeleteEntry
-
modify
-
getDirContext
protected LdapManager.DirContextHolder getDirContext(Supplier<Hashtable<String, String>> envSupplier)
-