开发者

Blackberry and OAuth Question

I am developing a Netflix application for the Blackberry, and so far one of my biggest challenges has been related to the OAuth protocol. I have been searching for examples of implementing OAuth with Java (on the Blackberry), and I have found very little. One of the other posts on stackoverflow recommended Signpost (http://code.google.com/p/oauth-signpost/), but I haven't开发者_JAVA百科 looked into it that much, as it seems there are some compatibility issues with the Netflix API.

So, I was wondering if anyone could offer advice on this matter. Does anyone recommend Signpost? Or anything else?

One alternative that I am thinking about is using an embedded web browser for authentication, I think this could make it a lot easier. However, if I do it this way, I am unsure to what extent I will be able to pass objects from the browser to my application. Also, I am unsure what this would mean for keeping a session active.

While I clearly have a lot more research to do, I would appreciate any help/advice along the way.

Thanks!


For compatibility with NetFlix, you should definitely use the Java OAuth library,

http://oauth.googlecode.com/svn/code/java/core/

If you look at the copyright notice, majority of the code was developed by NetFlix so I assume they must be using the same library.

There is a desktop demo example in this library,

http://oauth.googlecode.com/svn/code/java/example/desktop/

It shows you how to launch a browser to perform OAuth exchanges in a desktop application. Your scenario is very similar to this.


If you're having trouble with the Netflix OAuth flow, try out the Authorization Walk-Through, here:

http://developer.netflix.com/walkthrough

It's a single-page Web form that will walk you all the way from requesting a token to adding and deleting movies from a subscriber's queue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜