是否已经有适用于 Java/Android 的 OAuth2 库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4153022/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 05:03:36  来源:igfitidea点击:

Is there a OAuth2 library for Java / Android already?

javaandroidauthenticationoauthoauth-2.0

提问by OneWorld

I don't want to code things that already exist...

我不想编码已经存在的东西......

采纳答案by Lukasz Moren

Check mature and lightweight leeloo OAuth 2.0 Java library: http://leeloo.smartam.net/

检查成熟和轻量级的 leeloo OAuth 2.0 Java 库:http://leeloo.smartam.net/

It implements draft 10 of OAuth 2.0 specification and help you to build client, authorization and resource server.

它实现了 OAuth 2.0 规范草案 10,帮助您构建客户端、授权和资源服务器。

It was not tested on an Android platform, but you are welcome to provide a feedback.

它没有在 Android 平台上进行测试,但欢迎您提供反馈。

回答by GameDroids

I know this post is a little old, but since google always directs me to this one when I search for an Android OAuth 2.0 library, I think I need to tell you about OAuth2Android:

我知道这篇文章有点旧,但是因为当我搜索 Android OAuth 2.0 库时,谷歌总是将我指向这个,所以我想我需要告诉你关于 OAuth2Android:

Currently it supports Bearer-Tokens and MAC-Tokens based on the specifications:

目前它支持基于规范的 Bearer-Tokens 和 MAC-Tokens:

draft-ietf-oauth-v2-16
draft-ietf-oauth-v2-bearer-06
draft-ietf-oauth-v2-http-mac-00

草案-ietf-oauth-v2-16
草案-ietf -oauth-v2-bearer-06
草案-ietf-oauth-v2-http-mac-00

Other extensions are also possible and it will be updated.

其他扩展也是可能的,它将被更新。

You need at least Android Platform Version 2.3.3; API Level 10. You can get it here:
https://github.com/Xotan/OAuth2Android
or
[email protected]:Xotan/OAuth2Android.git

您至少需要 Android 平台版本 2.3.3;API 级别 10。您可以在此处获取:
https: //github.com/Xotan/OAuth2Android

[email protected]:Xotan/OAuth2Android.git

regards Christoph

克里斯托夫

回答by Doug Donohoe

FYI, the Scribe java library is awesome - great docs, simple and dedicated to oauth.

仅供参考,Scribe Java 库很棒 - 很棒的文档,简单且专用于 oauth。

https://github.com/fernandezpablo85/scribe-java/wiki/getting-started

https://github.com/fernandezpablo85/scribe-java/wiki/getting-started

回答by Buhake Sindi

OAuth 2is still in draftstage (as of this writing, draft 10).

OAuth 2仍处于草案阶段(在撰写本文时,草案 10)。

For now, Apache has an incubatorproject called Apache Amberwhich is:

目前,Apache 有一个名为Apache Amber孵化器项目,它是:

"...a Java development framework mainly aimed to build OAuth-aware applications"

“……一个主要用于构建 OAuth 感知应用程序的 Java 开发框架”

回答by Jason Hall

The google-oauth-java-clientis written by Google, and supports OAuth 1.0 and 2.0 (draft 10)

谷歌-OAuth的Java的客户机是由谷歌写的,和(10草案)支撑的OAuth 1.0和2.0

回答by Sergii Rudchenko

Here is the list of OAuth libraries proposed by Twitter development wiki: http://dev.twitter.com/pages/oauth_libraries#java

以下是 Twitter 开发 wiki 提出的 OAuth 库列表:http: //dev.twitter.com/pages/oauth_libraries#java

Currently at least one of the mentioned libraries is qualified as mature by Twitter developers. I think we can trust their expertise in OAuth.

目前,至少有一个提到的库被 Twitter 开发人员认定为成熟。我认为我们可以信任他们在 OAuth 方面的专业知识。

回答by Kimble