private Set<String> retrieveGroupsBySearching(String callerDn, LdapContext searchContext) { List<SearchResult> searchResults = searchGroups(searchContext, callerDn); Set<String> groups = new HashSet<>(); try { for (SearchResult searchResult : searchResults) { Attribute attribute = searchResult.getAttributes().get(ldapIdentityStoreDefinition.groupNameAttribute()); if (attribute != null) { for (Object group : list(attribute.getAll())) { if (group != null) { groups.add(group.toString()); } } } } } catch (NamingException e) { throw new IdentityStoreRuntimeException(e); } return groups; }
private Set<String> retrieveGroupsBySearching(String callerDn, LdapContext searchContext) { List<SearchResult> searchResults = searchGroups(searchContext, callerDn); Set<String> groups = new HashSet<>(); try { for (SearchResult searchResult : searchResults) { Attribute attribute = searchResult.getAttributes().get(ldapIdentityStoreDefinition.groupNameAttribute()); if (attribute != null) { for (Object group : list(attribute.getAll())) { if (group != null) { groups.add(group.toString()); } } } } } catch (NamingException e) { throw new IdentityStoreRuntimeException(e); } return groups; }
private Set<String> retrieveGroupsFromCallerObject(String callerDn, LdapContext searchContext) { try { Attributes attributes = searchContext.getAttributes(callerDn, new String[] { ldapIdentityStoreDefinition.groupMemberOfAttribute() }); Attribute memberOfAttribute = attributes.get(ldapIdentityStoreDefinition.groupMemberOfAttribute()); Set<String> groups = new HashSet<>(); if (memberOfAttribute != null) { for (Object group : list(memberOfAttribute.getAll())) { if (group != null) { String groupName = getGroupNameFromDn(group.toString(), ldapIdentityStoreDefinition.groupNameAttribute()); if (groupName != null) { groups.add(groupName); } } } } return groups; } catch (NamingException e) { throw new IdentityStoreRuntimeException(e); } }
private Set<String> retrieveGroupsFromCallerObject(String callerDn, LdapContext searchContext) { try { Attributes attributes = searchContext.getAttributes(callerDn, new String[] { ldapIdentityStoreDefinition.groupMemberOfAttribute() }); Attribute memberOfAttribute = attributes.get(ldapIdentityStoreDefinition.groupMemberOfAttribute()); Set<String> groups = new HashSet<>(); if (memberOfAttribute != null) { for (Object group : list(memberOfAttribute.getAll())) { if (group != null) { String groupName = getGroupNameFromDn(group.toString(), ldapIdentityStoreDefinition.groupNameAttribute()); if (groupName != null) { groups.add(groupName); } } } } return groups; } catch (NamingException e) { throw new IdentityStoreRuntimeException(e); } }
private SearchControls getGroupSearchControls() { SearchControls controls = new SearchControls(); controls.setSearchScope(convertScopeValue(ldapIdentityStoreDefinition.groupSearchScope())); controls.setCountLimit((long)ldapIdentityStoreDefinition.maxResults()); controls.setTimeLimit(ldapIdentityStoreDefinition.readTimeout()); controls.setReturningAttributes(new String[]{ldapIdentityStoreDefinition.groupNameAttribute()}); return controls; }
private SearchControls getGroupSearchControls() { SearchControls controls = new SearchControls(); controls.setSearchScope(convertScopeValue(ldapIdentityStoreDefinition.groupSearchScope())); controls.setCountLimit((long)ldapIdentityStoreDefinition.maxResults()); controls.setTimeLimit(ldapIdentityStoreDefinition.readTimeout()); controls.setReturningAttributes(new String[]{ldapIdentityStoreDefinition.groupNameAttribute()}); return controls; }
public static boolean hasAnyELExpression(LdapIdentityStoreDefinition in) { return AnnotationELPProcessor.hasAnyELExpression( in.bindDn(), in.bindDnPassword(), in.callerNameAttribute(), in.callerSearchBase(), in.callerSearchFilter(), in.callerSearchScopeExpression(), in.groupMemberAttribute(), in.groupMemberOfAttribute(), in.groupNameAttribute(), in.groupSearchBase(), in.groupSearchFilter(), in.groupSearchScopeExpression(), in.maxResultsExpression(), in.priorityExpression(), in.readTimeoutExpression(), in.url(), in.useForExpression() ); }
public static boolean hasAnyELExpression(LdapIdentityStoreDefinition in) { return AnnotationELPProcessor.hasAnyELExpression( in.bindDn(), in.bindDnPassword(), in.callerNameAttribute(), in.callerSearchBase(), in.callerSearchFilter(), in.callerSearchScopeExpression(), in.groupMemberAttribute(), in.groupMemberOfAttribute(), in.groupNameAttribute(), in.groupSearchBase(), in.groupSearchFilter(), in.groupSearchScopeExpression(), in.maxResultsExpression(), in.priorityExpression(), in.readTimeoutExpression(), in.url(), in.useForExpression() ); }
in.groupMemberAttribute(), in.groupMemberOfAttribute(), in.groupNameAttribute(), in.groupSearchBase(), in.groupSearchFilter(),
in.groupMemberAttribute(), in.groupMemberOfAttribute(), in.groupNameAttribute(), in.groupSearchBase(), in.groupSearchFilter(),