Skip to content

Commit b12811f

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 d77ff88 commit b12811f

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
@@ -553,7 +553,13 @@ private List<AttributeConsumingService> loadAttributeConsumingServices() {
553553
// multiple indexed services specified
554554
return acsProps.entrySet().stream()
555555
// ignore non-indexed service
556-
.filter(entry -> entry.getKey() != -1)
556+
.filter(entry -> {
557+
final boolean indexed = entry.getKey() != -1;
558+
if(!indexed) {
559+
LOGGER.warn("non indexed Attribute Consuming Service found along with other indexed Services; the non-indexed one will be ignored");
560+
}
561+
return indexed;
562+
})
557563
.map(entry -> loadAttributeConsumingService(entry.getValue(), entry.getKey()))
558564
.collect(Collectors.toList());
559565
}

0 commit comments

Comments
 (0)