http://pubsubhubbub.appspot.com/subscribe 407 authenticationrequired

369 views Asked by At

I have a subscriber client that connects to https://pubsubhubbub.appspot.com/subscribe I put parameter below

https://pubsubhubbub.appspot.com/subscribe
hub.topic    http://...../lastupby
hub.callback http://localhost:8080/Subscription/subscription/subscribe
hub.mode subscribe

i define proxy settings also,doesnot shown below but i take 407 authentication required response

HttpPost httppost = new HttpPost(hub);  
                    List<NameValuePair> nvps = new ArrayList<NameValuePair>();
                    nvps.add(new BasicNameValuePair("hub.callback", callbackUrl));
                    nvps.add(new BasicNameValuePair("hub.mode", "subscribe"));
                    nvps.add(new BasicNameValuePair("hub.topic", topic_url));
                    nvps.add(new BasicNameValuePair("hub.verify", "sync"));
                    if (lease_seconds != null)
                        nvps.add(new BasicNameValuePair("hub.lease_seconds", lease_seconds));
                    //For future https implementation
                    //if ((secret !=null) && (secret.getBytes("utf8").length < 200))
                    //  nvps.add(new BasicNameValuePair("hub.hub.secret", secret));
                    if (verifytoken !=null)
                        nvps.add(new BasicNameValuePair("hub.verify_token", verifytoken));

                    webserver.addAction("subscribe",topic_url, verifytoken);

                    httppost.setEntity(new UrlEncodedFormEntity(nvps));
                    httppost.setHeader("Content-type", "application/x-www-form-urlencoded");
                    httppost.setHeader("User-agent", "RSS pubsubhubbub 0.3");

                    //create the thread and start it running
                    GetThread thread = new GetThread(httpClient, httppost);
                    thread.start();
                    thread.join();

is there anyone know this problem i havent solved yet anyway thank you

1

There are 1 answers

1
Julien Genestoux On

If your callback is local, it will never work, as the hub needs to send it a verification request. Localhost in your callback url means that this url is local to your development machine, hence not accessible from the rest of the web, including the hub :)