private void enforceClientIP(final String storedClientIP) throws AuthLoginException {
  final String clientIP=ClientUtils.getClientIPAddress(getHttpServletRequest());
  if (storedClientIP == null || storedClientIP.isEmpty()) {
    DEBUG.message("Client IP not stored when persistent cookie was issued.");
    throw new AuthLoginException(AUTH_RESOURCE_BUNDLE_NAME,"authFailedClientIPDifferent",null);
  }
 else   if (clientIP == null || clientIP.isEmpty()) {
    DEBUG.message("Client IP could not be retrieved from request.");
    throw new AuthLoginException(AUTH_RESOURCE_BUNDLE_NAME,"authFailedClientIPDifferent",null);
  }
 else   if (!storedClientIP.equals(clientIP)) {
    DEBUG.message("Client IP not the same, original: " + storedClientIP + ", request: "+ clientIP);
    throw new AuthLoginException(AUTH_RESOURCE_BUNDLE_NAME,"authFailedClientIPDifferent",null);
  }
}

private void enforceClientIP ( final String storedClientIP ) throws AuthLoginException { final String clientIP = ClientUtils . getClientIPAddress ( getHttpServletRequest ( ) ) ; if ( storedClientIP == null || storedClientIP . isEmpty ( ) ) { DEBUG . message ( "Client IP not stored when persistent cookie was issued." ) ; throw new AuthLoginException ( AUTH_RESOURCE_BUNDLE_NAME , "authFailedClientIPDifferent" , null ) ; } else if ( clientIP == null || clientIP . isEmpty ( ) ) { DEBUG . message ( "Client IP could not be retrieved from request." ) ; throw new AuthLoginException ( AUTH_RESOURCE_BUNDLE_NAME , "authFailedClientIPDifferent" , null ) ; } else if ( ! storedClientIP . equals ( clientIP ) ) { DEBUG . message ( "Client IP not the same, original: " + storedClientIP + ", request: " + clientIP ) ; throw new AuthLoginException ( AUTH_RESOURCE_BUNDLE_NAME , "authFailedClientIPDifferent" , null ) ; } }
enforces that the client ip that the request originated from matches the stored client ip that the persistent cookie was issued to .
