Class DefaultMetadataPolicyMergingStrategy
java.lang.Object
net.shibboleth.idp.plugin.oidc.op.profile.logic.DefaultMetadataPolicyMergingStrategy
- All Implemented Interfaces:
BiFunction<Map<String,MetadataPolicy>, Map<String, MetadataPolicy>, Pair<Map<String, MetadataPolicy>, Boolean>>
public class DefaultMetadataPolicyMergingStrategy
extends Object
implements BiFunction<Map<String,MetadataPolicy>,Map<String,MetadataPolicy>,Pair<Map<String,MetadataPolicy>,Boolean>>
A function that merges two maps of metadata policies according to the rules specified in the OIDC federation spec (draft 17), section 5.1.3.1:
- subset_of: The result of merging the values of two subset_of operators is the intersection of the operator values.
- one_of: The result of merging the values of two one_of operators is the intersection of the operator values.
- superset_of: The result of merging the values of two superset_of operators is the union of the operator values.
- add: The result of merging the values of two add operators is the union of the values.
- value: Merging two value operators is NOT allowed unless the two operator values are equal.
- default: Merging two default operators is NOT allowed unless the two operator values are equal.
- essential: If a superior has specified essential=true, then a subordinate cannot change that. If a superior has specified essential=false, then a subordinate is allowed to change that to essential=true. If a superior has not specified essential, then a subordinate can set essential to true or false.
The function returns a pair of map of merged metadata policies and a boolean indicating if the merging operators in the policies were compliant.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(Map<String, MetadataPolicy> first, Map<String, MetadataPolicy> second) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
DefaultMetadataPolicyMergingStrategy
public DefaultMetadataPolicyMergingStrategy()
-
-
Method Details
-
apply
@Nonnull public Pair<Map<String,MetadataPolicy>, applyBoolean> (@Nullable Map<String, MetadataPolicy> first, @Nullable Map<String, MetadataPolicy> second) - Specified by:
applyin interfaceBiFunction<Map<String,MetadataPolicy>, Map<String, MetadataPolicy>, Pair<Map<String, MetadataPolicy>, Boolean>>
-