Skip to content

Commit f272092

Browse files
committed
Add warning log when ignoring a non-indexed Attribute Consuming Service
When a non-indexed Attribute Consuming Service is defined in configuration along with other indexed Services, a warning is printed to the log to inform that the non-indexed one will be ignored.
1 parent d66fd25 commit f272092

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/src/main/java/com/onelogin/saml2/settings/SettingsBuilder.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,13 @@ private List<AttributeConsumingService> loadAttributeConsumingServices() {
530530
// multiple indexed services specified
531531
return acsProps.entrySet().stream()
532532
// ignore non-indexed service
533-
.filter(entry -> entry.getKey() != -1)
533+
.filter(entry -> {
534+
final boolean indexed = entry.getKey() != -1;
535+
if(!indexed) {
536+
LOGGER.warn("non indexed Attribute Consuming Service found along with other indexed Services; the non-indexed one will be ignored");
537+
}
538+
return indexed;
539+
})
534540
.map(entry -> loadAttributeConsumingService(entry.getValue(), entry.getKey()))
535541
.collect(Collectors.toList());
536542
}

0 commit comments

Comments
 (0)