Package net.shibboleth.idp.profile.logic
Class LoopDetectionPredicate
java.lang.Object
net.shibboleth.idp.profile.logic.AbstractRelyingPartyPredicate
net.shibboleth.idp.profile.logic.LoopDetectionPredicate
- All Implemented Interfaces:
Predicate<ProfileRequestContext>
,Predicate<ProfileRequestContext>
A condition that relies on a
Meter
to detect looping SPs.- Since:
- 4.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Class logger.Map of RP names to meter names.private long
Count to trigger warning.private Function<ProfileRequestContext,
String> Lookup strategy to obtain subject name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setRelyingPartyMap
(Map<String, String> map) Set the map of relying party names to meter names to track counts.void
setThreshold
(long value) Set the warning threshold for the 1 minute moving average to exceed.void
Set lookup strategy to obtain username.boolean
test
(ProfileRequestContext input) Methods inherited from class net.shibboleth.idp.profile.logic.AbstractRelyingPartyPredicate
getRelyingPartyContextLookupStrategy, setRelyingPartyContextLookupStrategy
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
threshold
private long thresholdCount to trigger warning. -
relyingPartyMap
Map of RP names to meter names. -
usernameLookupStrategy
Lookup strategy to obtain subject name.
-
-
Constructor Details
-
LoopDetectionPredicate
public LoopDetectionPredicate()Constructor.
-
-
Method Details
-
setThreshold
Set the warning threshold for the 1 minute moving average to exceed.Defaults to 20.
- Parameters:
value
- threshold to use
-
setRelyingPartyMap
Set the map of relying party names to meter names to track counts.- Parameters:
map
- map of RP/meter mappings
-
setUsernameLookupStrategy
Set lookup strategy to obtain username.- Parameters:
strategy
- lookup strategy
-
test
-