Handling Google clientLogin Captcha Example - google-app-engine

I have a desktop application.
I try to perform authentication using
http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
However, whenever I get a Captcha challenge, I use a HTTP GET request (I test using web browser) to get the image to present to user.
https://www.google.com/accounts/Captcha?ctoken=Y-DrsDJRiWNOP3gR7fq0PAq4Yxvi3UXewu7P7jgAKjk0eZKQ358nbh27-JZ3-nlzXvfKOD3JvZNXwmlRunyz8jPKzqmkOLw2LYb3ZWjg-tE%3A0gMUFttsSH7QwganSJd1aw
However, I always get the images :
Sorry, we are unable to handle your
request at this time. Please try again
later.
Any idea what I had did wrong? Thanks!

I had solved the problem, please refer to code
http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/gui/Utils.java?revision=1.86&view=markup (See getCapchaRespond method)
http://jstock.cvs.sourceforge.net/viewvc/jstock/Cloud/src/java/org/shuwnyuan/cloud/Authenticate.java?revision=1.2&view=markup

Related

Trying to implement in-app voice call from browser

I have cloned the click-to-call repository and followed the steps as mentioned. I am able to login with said created user but then get stuck at /rtc API.I got some error in network panel. and "General SSL engine problem in console which is not correct. SSL certificates are all correct." Let me know where i went wrong. Please check the screenshot below :
I have had a talk with nexmo team, they said it is the ssl issue.
https://help.nexmo.com/hc/en-us/articles/207051767-Certificate-for-nexmo-com
Now I am unable to find where to import the certificate to my app?
I am the JavaScript Developer Advocate at Vonage (Nexmo).
You also filed an issue at https://github.com/nexmo-community/client-sdk-click-to-call correct? Thanks for that. I will also post my response here.
From your issue, it looks as if the Conversation Id is not being sent.
We recently merged some changes to the repo.
In your .env file, do you have SUPPORT_PHONE_NUMBER? That should be NEXMO_NUMBER.
Also, when calling the server, previously the code in the client.js around line 34 was application.callServer(); it is now application.callServer(application.me.name);
Let me know if this works for you.
Check with Nexmo - either you are out of balance or your account has been been marked inactive for some reason. Most of the time its because of insufficient balance.

Problems using Twitter4j on GAE throws 401 just after deploy

Well, I'm having a weird error here:
I'm developing one GAE app to read some Twitter Data, and after read a lot of docs, I have it working on my test server (Running on my pc) but after deploy and test on the real (my appspot domain) it shows this message:
401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or >incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the >system clock is in sync.
message - Could not authenticate you
code - 32
I've tried to recreate my OAuthAppToken and OAuthAppTokenSecret keys, even changing the permissions to "Write, Read and Direct Messages" and even assingning one Callback URL but nothing seems to work...
I've tried using twitter4j.properties OR using setOAuthConsumer(TW_CONSUMER_KEY, TW_CONSUMER_SECRET) OR a ConfigurationBuilder whith the correct constants and I'm experimenting the same Issue.
I'm working with AppEngine 1.8.3 and Twitter4j 3.0.4
Iv'e been writing on log and the Twitter object seems to be well created... I dont understand why is working on my PC but not on the real app.
On some other post someone says that could be because it needs to use Sync clock.. but he doesn't explains where to change that property...
Did someone had a clue?
Ok, the problem was me (and Twitter.... well..... I really think it was Twitter problem for being so dark on his api messages)...
On testing server I was looking for an existing account and on the cloud I was looking for an inexistent one. So, It was my mistake. But seriously, what about Twitter saying: "Access Forbidden"? That doesn't have any sense...

HTTP Error 405 Method not allowed error in admin log

I'm getting a strange error in my newly deployed application in appengine. In the error log it tells me that PageRank, TwitterBot and a couple of others. I would guess this is due to these try to get data using ajax or another async service resulting in "same origin policy"-problem.
My question is does anyone know what these bots are trying to get? For example if pagerank (google page rank I would guess) can't get any info about my application would this effect my page rank. And anyone know what the twitterbot does? And if there is away to handle to provide a proper response?
Most likely, your RequestHandlers (I'm assuming you're using python with webapp from the tags on your earlier questions) aren't implementing a method for whichever request method the bots are using. I'd guess they're HEAD requests, and you have no head() methods defined.

Silverlight - Check Website

How do I check to see if a website exists at a URL in Silverilght? I basically want to ping a web page. However, the WebClient does not seem to work for me. Is there a way to check HTTP response codes in Silverlight? What does the code look like to ping a web site?
Thank you
You could parse out the results from http://downforeveryoneorjustme.com/.
Check out URL Access Restrictions in Silverlight, and here's an example for Using WebClient and HttpRequest.

Silverlight - checking for a 302 http response

Does anyone know if it is possible to discover that a response from a WCF call in Silverlight resulted in a 302 (temporary redirect).
The 302 is generated because our service is behind ISA and the user session timesout. The Silverligt app remains loaded in the browser and the usre interacts to make a WCF call which fails. I can get a Not Found error but this is also reported for a number of different issues so not really a solution. I want to specifically target a 302 and refresh the page to get the user to reauthenticate.
I faced similar problem and luckily found a solution: to be able to retrieve StatusCode of a web request other than 200 or 404 you should use
var request = WebRequestCreator.ClientHttp.Create(uri)
instead of
var request = WebRequest.Create(uri) as HttpWebRequest;
I wrote a post on this issue recently, you can take a look here.
I was looking for an answer to the same question, but have decided not to use this approach to solve the problem I was dealing with, so I don't have a compelte solution for you, but if you are using Silverlight 3, then you may be able to solve it. I got as far as using the alternate Http stack as discussed at the bottom of this page:
http://developers.de/blogs/damir_dobric/archive/2009/08/22/soap-faults-and-new-network-stack-in-silverlight-3.aspx
This at least allowed me to gain access to SOAP faults, but I don't know if/how you can access HTTP 302 responses, since when I tried to do so, I found that Silverlight appeared to actually follow the redirect and re-issue my SOAP request there rather than report it back to my application.
What I did start investigating though is how this might be changed using behaviors. I didn't get very far with this investigation though so don't know if its feasible or not!

Resources