def get(req)
    target_uri = req.header.request_uri
    param = Util.hash_find_value(@challenge) { |uri, param|
      Util.uri_part_of(target_uri, uri)
    }
    return nil unless param
    user, passwd = Util.hash_find_value(@auth) { |uri, auth_data|
      Util.uri_part_of(target_uri, uri)
    }
    return nil unless user
    uri = req.header.request_uri
    calc_cred(req.header.request_method, uri, user, passwd, param)
  end
def get(req)
    target_uri = req.header.request_uri
    param = Util.hash_find_value(@challenge) { |uri, param|
      Util.uri_part_of(target_uri, uri)
    }
    return nil unless param
    user, passwd = Util.hash_find_value(@auth) { |uri, auth_data|
      Util.uri_part_of(target_uri, uri)
    }
    return nil unless user
    uri = req.header.request_uri
    calc_cred(req.header.request_method, uri, user, passwd, param)
  end
send cred only when a given uri is;
   - child page of challengeable(got WWW-Authenticate before) uri and,
   - child page of defined credential