code: public int vote(Authentication auth,
                      Object resource,
                      Collection config) {
          String label = "UserIpLimitsAccessVoter";
          if (resource != null && !supports(resource.getClass())) {
              log.debug(debugText(label, auth, config, resource, ACCESS_ABSTAIN));
              return ACCESS_ABSTAIN;
          }
  
          FilterInvocation invocation = (FilterInvocation) resource;
          HttpServletRequest httpRequest = invocation.getHttpRequest();
          if (null == httpRequest) {
              log.debug(debugText(label, auth, config, resource, ACCESS_DENIED));
              return ACCESS_DENIED;
          }
  
          String userIpLimits = getUserIpLimits(auth);
          // if user IP limits are set, check request IP
          if (null != userIpLimits && !userIpLimits.equals("")) {
              String requestIp = httpRequest.getRemoteAddr();
  
              String[] ipLimits = userIpLimits.split(";");
              for (String ipLimit : ipLimits) {
                  if (ipInRange(requestIp, ipLimit)) {
                      // User's IP is within this range, grant access
                      log.debug(debugText(label, auth, config, resource, ACCESS_GRANTED));
                      return ACCESS_GRANTED;
                  }
              }
  
              // There are IP limits, and none of them match the user's IP, deny
              log.debug(debugText(label, auth, config, resource, ACCESS_DENIED));
              return ACCESS_DENIED;
          } else { // No user IP limits, abstain
              log.debug(debugText(label, auth, config, resource, ACCESS_ABSTAIN));
              return ACCESS_ABSTAIN;
          }
      }
docs: This method checks the IP limits of the principal and denys access if
  those limits exist and the request is coming from outside the specified
  range.
  
  @param auth     principal seeking AuthZ
  @param resource that is under protection
  @param config   access-attributes defined on resource
  @return vote (AccessDecisionVoter.ACCESS_GRANTED, ACCESS_DENIED, ACCESS_ABSTAIN)