Skip to content

Commit

Permalink
Merge pull request wildfly-extras#56 from olukas/elytron
Browse files Browse the repository at this point in the history
Added identity-mapping.filter-name attribute to ldap-realm
  • Loading branch information
Ondrej Lukas authored Jan 20, 2017
2 parents c40467c + cf0f188 commit 0f38f6e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void apply(OnlineCommandContext ctx) throws Exception {
addOptionalToModelNode(identityMappingModelNode, "search-base-dn", identityMapping.getSearchBaseDn());
addOptionalToModelNode(identityMappingModelNode, "use-recursive-search",
identityMapping.getUseRecursiveSearch());
addOptionalToModelNode(identityMappingModelNode, "filter-name", identityMapping.getFilterName());
addOptionalToModelNode(identityMappingModelNode, "iterator-filter", identityMapping.getIteratorFilter());
addOptionalToModelNode(identityMappingModelNode, "new-identity-parent-dn",
identityMapping.getNewIdentityParentDn());
Expand Down Expand Up @@ -191,6 +192,7 @@ public static final class IdentityMapping {
private final String rdnIdentifier;
private final String searchBaseDn;
private final Boolean useRecursiveSearch;
private final String filterName;
private final String iteratorFilter;
private final String newIdentityParentDn;
private final List<AttributeMapping> attributeMappings;
Expand All @@ -203,6 +205,7 @@ private IdentityMapping(IdentityMappingBuilder builder) {
this.rdnIdentifier = builder.rdnIdentifier;
this.searchBaseDn = builder.searchBaseDn;
this.useRecursiveSearch = builder.useRecursiveSearch;
this.filterName = builder.filterName;
this.iteratorFilter = builder.iteratorFilter;
this.newIdentityParentDn = builder.newIdentityParentDn;
this.attributeMappings = builder.attributeMappings;
Expand All @@ -224,6 +227,10 @@ public Boolean getUseRecursiveSearch() {
return useRecursiveSearch;
}

public String getFilterName() {
return filterName;
}

public String getIteratorFilter() {
return iteratorFilter;
}
Expand Down Expand Up @@ -259,6 +266,7 @@ public static final class IdentityMappingBuilder {
private String rdnIdentifier;
private String searchBaseDn;
private Boolean useRecursiveSearch;
private String filterName;
private String iteratorFilter;
private String newIdentityParentDn;
private List<AttributeMapping> attributeMappings = new ArrayList<AttributeMapping>();
Expand All @@ -282,6 +290,11 @@ public IdentityMappingBuilder useRecursiveSearch(Boolean useRecursiveSearch) {
return this;
}

public IdentityMappingBuilder filterName(String filterName) {
this.filterName = filterName;
return this;
}

public IdentityMappingBuilder iteratorFilter(String iteratorFilter) {
this.iteratorFilter = iteratorFilter;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public void addFullLdapRealm() throws Exception {
.rdnIdentifier("someId")
.searchBaseDn("someSearchBaseDn")
.useRecursiveSearch(true)
.filterName("someFilterName")
.iteratorFilter("someIteratorFilter")
.newIdentityParentDn("DN=someDn")
.addAttributeMappings(new AddLdapRealm.AttributeMappingBuilder()
Expand Down Expand Up @@ -149,6 +150,7 @@ public void addFullLdapRealm() throws Exception {
checkAttribute("identity-mapping.rdn-identifier", "someId");
checkAttribute("identity-mapping.search-base-dn", "someSearchBaseDn");
checkAttribute("identity-mapping.use-recursive-search", "true");
checkAttribute("identity-mapping.filter-name", "someFilterName");
checkAttribute("identity-mapping.iterator-filter", "someIteratorFilter");
checkAttribute("identity-mapping.new-identity-parent-dn", "DN=someDn");

Expand Down

0 comments on commit 0f38f6e

Please sign in to comment.