Examples of IPMatcher


Examples of org.w3c.jigsaw.auth.IPMatcher

     */
    protected IPMatcher ipmatcher = null ;

    protected IPMatcher getIPMatcher() {
  if (ipmatcher == null) {
      ipmatcher = new IPMatcher();
      short[][] ips = getSecureIPs();
      if ( ips != null ) {
    for (int i = 0 ; i < ips.length ; i++)
        ipmatcher.add(ips[i], Boolean.TRUE) ;
      }
View Full Code Here

Examples of org.w3c.jigsaw.auth.IPMatcher

    protected void authenticate(Request request, JAcl acls[])
      throws ProtocolException
    {
  Client      client      = request.getClient();
  InetAddress inetaddress = client.getInetAddress();
  IPMatcher   ipmatcher   = getIPMatcher();
  System.out.println(">>> "+inetaddress);
  if (ipmatcher.lookup(inetaddress) != null) {
      // secure ip, basic auth
      setValue(ATTR_SECURITY_LEVEL, new Integer(0));
  } else {
      // unsecure ip, digest auth
      setValue(ATTR_SECURITY_LEVEL, new Integer(1));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.