Class IPRangePredicate

java.lang.Object
org.opensaml.profile.logic.IPRangePredicate
All Implemented Interfaces:
Predicate<BaseContext>

public class IPRangePredicate extends Object implements Predicate<BaseContext>
A Predicate that checks if a request is from a set of one or more IPRanges.
  • Field Details

  • Constructor Details

    • IPRangePredicate

      IPRangePredicate()
      Constructor.
  • Method Details

    • setRanges

      public void setRanges(@Nonnull Collection<IPRange> ranges)
      Set the address ranges to check against.
      Parameters:
      ranges - address ranges to check against
      Since:
      3.3.0
    • setHttpServletRequestSupplier

      public void setHttpServletRequestSupplier(@Nonnull Supplier<HttpServletRequest> supplier)
      Set the Supplier for the servlet request to evaluate.
      Parameters:
      supplier - servlet request supplier to use
    • test

      public boolean test(@Nullable BaseContext input)
      Specified by:
      test in interface Predicate<BaseContext>