34 Star 96 Fork 33

ada / scribejava

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Welcome to the home of ScribeJava, the simple OAuth Java lib!

Why use ScribeJava?

Dead Simple

Who said OAuth/OAuth2 was difficult? Configuring ScribeJava is so easy your grandma can do it! check it out:

OAuthService service = new ServiceBuilder()
                                  .apiKey(YOUR_API_KEY)
                                  .apiSecret(YOUR_API_SECRET)
                                  .build(LinkedInApi20.instance());

That single line (added newlines for readability) is the only thing you need to configure ScribeJava with LinkedIn's OAuth API for example.

Threadsafe

Hit ScribeJava as hard and with many threads as you like.

Async

You can use ning async http client out-of-box, just use ServiceBuilderAsync

Supports all major 1.0a and 2.0 OAuth APIs out-of-the-box

  • Google

  • Facebook

  • Yahoo

  • LinkedIn

  • Twitter

  • Foursquare

  • Evernote

  • Vimeo

  • Windows Live

  • Odnoklassniki

  • Mail.ru

  • LinkedIn2.0

  • Google2.0

  • GitHub

  • and many more! check the examples folder

Small and modular

ScribeJava's code is small (about 1k LOC) and simple to understand. No smart-ass or "clever" hacks here. You can use only 'core' or 'with apis' maven modules

Android-Ready

Works out of the box with android(TM) applications.

Stable & bulletproof

Good test coverage to keep you safe from harm.

When something bad actually happens, ScribeJava's meaningful error messages will tell you exactly what went wrong, when and where.

Pull it from Maven Central!

You can pull ScribeJava from the central maven repository, just add these to your pom.xml file:

<dependency>
    <groupId>com.github.scribejava</groupId>
    <artifactId>scribejava-apis</artifactId>
    <version>2.5.3</version>
</dependency>

And in case you need just core classes (that's it, without any external API (FB, VK, GitHub, Google etc) specific code), you could pull just 'core' artifact.

<dependency>
    <groupId>com.github.scribejava</groupId>
    <artifactId>scribejava-core</artifactId>
    <version>2.5.3</version>
</dependency>

Getting started in less than 2 minutes

Check the Getting Started page and start rocking! Please Read the FAQ before creating an issue :)

Also, remember to read the fantastic tutorial that @akoskm wrote to easily integrate a server side app with an API (twitter in this case).

Questions?

Feel free to drop us an email or create issue right here on github.com

Forks

If you have a useful fork that should be listed there please contact us

QQ登陆

    final String apiKey = "101303927";
    final String apiSecret = "0c3ac6430d6e2f60dfb637101252417e ";
    final OAuth20Service service = new ServiceBuilder().apiKey(apiKey).apiSecret(apiSecret)
            .callback("http://www.yichisancun.com/qqlogin.htm").state("xxxx")
            .scope("get_user_info,list_album,upload_pic,do_like").build(QQApi.instance());
    System.out.println(service.getAuthorizationUrl())

微信登陆

    final String apiKey = "x";
    final String apiSecret = "x ";
    final OAuth20Service service = new ServiceBuilder().apiKey(apiKey).apiSecret(apiSecret)
            .callback("url").state("xxxx").scope("snsapi_login")
            .build(WeiXinApi.instance());
    System.out.println(service.getAuthorizationUrl());

开源中国登陆

 final OAuth20Service    oschina = new ServiceBuilder().apiKey("CTJlkYcnBaZCsi4GGgUk").grantType("authorization_code")
            .apiSecret("TlKrmPCKImAKEzk1ORZtdwooJKDIgXrF").callback("http://www.yichisancun.com/oschinalogin.htm")
            .responseType("code").build(OschinaApi.instance());
            System.out.println(service.getAuthorizationUrl());

=======

Welcome to the home of ScribeJava, the simple OAuth Java lib!

Why use ScribeJava?

Dead Simple

Who said OAuth/OAuth2 was difficult? Configuring ScribeJava is so easy your grandma can do it! check it out:

OAuthService service = new ServiceBuilder()
                                  .apiKey(YOUR_API_KEY)
                                  .apiSecret(YOUR_API_SECRET)
                                  .build(LinkedInApi20.instance());

That single line (added newlines for readability) is the only thing you need to configure ScribeJava with LinkedIn's OAuth API for example.

Threadsafe

Hit ScribeJava as hard and with many threads as you like.

Async

You can use ning async http client out-of-box, just use ServiceBuilderAsync

Supports all major 1.0a and 2.0 OAuth APIs out-of-the-box

Small and modular

ScribeJava's code is small (about 1k LOC) and simple to understand. No smart-ass or "clever" hacks here. You can use only 'core' or 'with apis' maven modules

Android-Ready

Works out of the box with android(TM) applications.

Stable & bulletproof

Good test coverage to keep you safe from harm.

When something bad actually happens, ScribeJava's meaningful error messages will tell you exactly what went wrong, when and where.

Pull it from Maven Central!

You can pull ScribeJava from the central maven repository, just add these to your pom.xml file:

<dependency>
    <groupId>com.github.scribejava</groupId>
    <artifactId>scribejava-apis</artifactId>
    <version>2.7.3</version>
</dependency>

And in case you need just core classes (that's it, without any external API (FB, VK, GitHub, Google etc) specific code), you could pull just 'core' artifact.

<dependency>
    <groupId>com.github.scribejava</groupId>
    <artifactId>scribejava-core</artifactId>
    <version>2.7.3</version>
</dependency>

Getting started in less than 2 minutes

Check the Getting Started page and start rocking! Please Read the FAQ before creating an issue :)

Also, remember to read the fantastic tutorial that @akoskm wrote to easily integrate a server side app with an API (twitter in this case).

Questions?

Feel free to drop us an email or create issue right here on github.com

Forks

If you have a useful fork that should be listed there please contact us

branch 'master' of https://github.com/scribejava/scribejava.git

The MIT License Copyright (c) 2013 hh.ru Copyright (c) 2010 Pablo Fernandez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

the simple OAuth Java lib! 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/cng1985/scribejava.git
git@gitee.com:cng1985/scribejava.git
cng1985
scribejava
scribejava
master

搜索帮助