Commit 6f2eb181 authored by michael.simon's avatar michael.simon
Browse files

Also filter for Display Name at Discovery. #44

parent 17cdf36b
......@@ -154,11 +154,18 @@ public class DiscoveryLoginBean implements Serializable {
List<SamlIdpMetadataEntity> filteredList = new ArrayList<SamlIdpMetadataEntity>();
for (SamlIdpMetadataEntity idp : idpList) {
if (Pattern.compile(
if (idp.getOrgName() != null &&
Pattern.compile(
Pattern.quote(filter), Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE)
.matcher(idp.getOrgName()).find()) {
filteredList.add(idp);
}
else if (idp.getDisplayName() != null &&
Pattern.compile(
Pattern.quote(filter), Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE)
.matcher(idp.getDisplayName()).find()) {
filteredList.add(idp);
}
}
if (filteredList.size() == 1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment