黑莓和 OAuth 问题
我正在为 Blackberry 开发 Netflix 应用程序,到目前为止,我最大的挑战之一与 OAuth 协议有关。我一直在寻找使用 Java(在 Blackberry 上)实现 OAuth 的示例,但发现很少。 stackoverflow 上的其他帖子之一推荐了 Signpost (http://code.google.com/p /oauth-signpost/),但我没有深入研究它,因为 Netflix API 似乎存在一些兼容性问题。
所以,我想知道是否有人可以就这个问题提供建议。有人推荐路标吗?还是其他什么?
我正在考虑的一种替代方案是使用嵌入式网络浏览器进行身份验证,我认为这可以使它变得更容易。但是,如果我这样做,我不确定在多大程度上能够将对象从浏览器传递到我的应用程序。另外,我不确定这对于保持会话活跃意味着什么。
虽然我显然还有很多研究要做,但我很感激在此过程中提供的任何帮助/建议。
谢谢!
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 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了与 NetFlix 兼容,您绝对应该使用 Java OAuth 库,
http://oauth .googlecode.com/svn/code/java/core/
如果您查看版权声明,您会发现大部分代码是由 NetFlix 开发的,因此我认为它们必须使用相同的库。
该库中有一个桌面演示示例,
http://oauth.googlecode .com/svn/code/java/example/desktop/
它向您展示了如何启动浏览器以在桌面应用程序中执行 OAuth 交换。您的情况与此非常相似。
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.
如果您在使用 Netflix OAuth 流程时遇到问题,请尝试此处的授权演练:
http:// developer.netflix.com/walkthrough
这是一个单页 Web 表单,将引导您从请求令牌到在订阅者队列中添加和删除电影。
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.