public boolean isIPValid(Session sess,String clientIP) throws SSOException {
  boolean check=false;
  try {
    InetAddress sessIPAddress=InetAddress.getByName(sess.getProperty("Host"));
    InetAddress clientIPAddress=InetAddress.getByName(clientIP);
    if (sessIPAddress.equals(clientIPAddress)) {
      check=true;
    }
  }
 catch (  Exception e) {
    if (debug.messageEnabled()) {
      debug.message("IP address check of Token Failed",e);
    }
  }
  return check;
}

public boolean isIPValid ( Session sess , String clientIP ) throws SSOException { boolean check = false ; try { InetAddress sessIPAddress = InetAddress . getByName ( sess . getProperty ( "Host" ) ) ; InetAddress clientIPAddress = InetAddress . getByName ( clientIP ) ; if ( sessIPAddress . equals ( clientIPAddress ) ) { check = true ; } } catch ( Exception e ) { if ( debug . messageEnabled ( ) ) { debug . message ( "IP address check of Token Failed" , e ) ; } } return check ; }
validate the ip address of the client with the ip stored in session .
