Android的&放大器; OAUTH 2.0 [英] Android & OAUTH 2.0

查看:128
本文介绍了Android的&放大器; OAUTH 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能工作了这一点,救我一命!

所以,我有一个codeigniter基于REST API与OAUTH 2.0(草案23或东西)服务器为我自己的身份验证系统(不使用Twitter或FB)

我希望能够用这个来让用户登录我的Andr​​oid应用程序。

我找不到这个互联网上的任何信息的任何地方。有一对夫妇的不支持OAUTH 2.0客户端库在那里,如Leeloo(其中转移到Apache的琥珀,它一直没有更新了一年多,也有过琥珀在任何版本)。

我的提问,因此有:

  1. 是OAUTH 2.0太新了?这似乎是一对夫妇年之久......它仍然是太新的工作。我应该使用OAuth 1? (这似乎是不支持反正 - 所有的codeigniter OAUTH 1库已经转移到2.0)。

  2. 我应该使用一个完全不同的技术?例如我听说过的XAuth的。同样在这个信息似乎是pretty的粗略。

  3. 有什么事情很容易做自己?它不会出现这样,但大多数人只是创建自己的自制软件的解决方案?我不能找到这么多的信息无论是。

任何帮助,您可以给我将是巨大的。你可以点我也还有任何资源将是pretty的惊人。

感谢您的时间。

解决方案
  1. 没有,OAuth的2.0是足够老的一些优秀的开源库的支持。你可以如使用

  2. 对不起,我不知道够不够有关XAuth的还没有来帮你。

  3. 是的,这很容易使用划线。为了支持自定义的供应商,你只需要延长 org.scribe.builder.api.DefaultApi20 。当你的使用OAuth 2.0的相同草案谷歌确实,你可以使用<一个href="https://github.com/bistri/scribe-java/blob/master/src/test/java/org/scribe/examples/GoogleExample20.java">implementation在划线为蓝本的托马斯Bruyelle的叉的谷歌API 本文应该让你开始使用隶与Android。你可以进一步检查出谷歌的例子,从划线叉<一href="https://github.com/bistri/scribe-java/blob/master/src/test/java/org/scribe/examples/GoogleExample20.java">here.

I cannot work this out to save my life!

So, I have a Codeigniter based REST api with an OAUTH 2.0 (draft 23 or something) server for my own auth system (not using Twitter or FB)

I want to be able to use this to allow users to "log in" to my Android app.

I can't find any information about this on the internet anywhere. There are a couple of unsupported OAUTH 2.0 client libraries out there, such as Leeloo (which moved to Apache Amber, which hasn't been updated for over a year, and there have been no releases under Amber).

My questions therefore are:

  1. Is OAUTH 2.0 too new? It seems to be a couple of years old... is it still too new to work with. Should I be using OAUTH 1? (which seems to be unsupported anyway - all the codeigniter OAUTH 1 libs have moved to 2.0).

  2. Should I be using a completely different technology? e.g. I have heard of "xauth". Again information on this seems to be pretty sketchy.

  3. Is it something easy enough to do myself? It doesn't appear so, but do most people just create their own homebrew solutions? I can't find much info about this either.

Any help you can give me will be great. Any resources you can point me too as well will be pretty amazing.

Thanks for your time.

解决方案

  1. No, OAuth 2.0 is old enough to be supported by some good open source libraries. You could e.g. use scribe.

  2. Sorry, I don't know enough about XAuth yet to help you with that.

  3. Yeah, it's really easy using scribe. To support a custom Provider you simply have to extend org.scribe.builder.api.DefaultApi20. As your using the same Draft of OAuth 2.0 as Google does, you can use the implementation for the Google API in Thomas Bruyelle's fork of scribe as a blueprint. This article should get you started for using scribe with Android. You could further check out the Google example from the scribe fork here.

这篇关于Android的&放大器; OAUTH 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆