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>
public class LoopDetectionPredicate extends AbstractRelyingPartyPredicate
A condition that relies on aMeterto detect looping SPs.- Since:
- 4.1.0
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private Map<String,String>relyingPartyMapMap of RP names to meter names.private longthresholdCount to trigger warning.private Function<ProfileRequestContext,String>usernameLookupStrategyLookup strategy to obtain subject name.
-
Constructor Summary
Constructors Constructor Description LoopDetectionPredicate()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetRelyingPartyMap(Map<String,String> map)Set the map of relying party names to meter names to track counts.voidsetThreshold(long value)Set the warning threshold for the 1 minute moving average to exceed.voidsetUsernameLookupStrategy(Function<ProfileRequestContext,String> strategy)Set lookup strategy to obtain username.booleantest(ProfileRequestContext input)-
Methods inherited from class net.shibboleth.idp.profile.logic.AbstractRelyingPartyPredicate
getRelyingPartyContextLookupStrategy, setRelyingPartyContextLookupStrategy
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
threshold
private long threshold
Count to trigger warning.
-
relyingPartyMap
@Nonnull @NonnullElements private Map<String,String> relyingPartyMap
Map of RP names to meter names.
-
usernameLookupStrategy
@Nonnull private Function<ProfileRequestContext,String> usernameLookupStrategy
Lookup strategy to obtain subject name.
-
-
Method Detail
-
setThreshold
public void setThreshold(@Positive long value)
Set the warning threshold for the 1 minute moving average to exceed.Defaults to 20.
- Parameters:
value- threshold to use
-
setRelyingPartyMap
public void setRelyingPartyMap(@Nullable @NonnullElements Map<String,String> map)
Set the map of relying party names to meter names to track counts.- Parameters:
map- map of RP/meter mappings
-
setUsernameLookupStrategy
public void setUsernameLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)Set lookup strategy to obtain username.- Parameters:
strategy- lookup strategy
-
test
public boolean test(@Nullable ProfileRequestContext input)
-
-