Who said OAuth/OAuth2 was difficult? Configuring ScribeJava is so easy your grandma can do it! check it out:
OAuthService service = new ServiceBuilder(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.
Working runnable examples are here Common usage: example
Hit ScribeJava as hard and with many threads as you like.
That's it. You can use it in old environments and in android apps. note: To compile from sources you will need Java 9 or newer
ScribeJava support out-of-box several HTTP clients:
- ning async http client 1.9.x (maven module scribejava-httpclient-ning) example
- Async Http Client asynchttpclient 2.x (maven module scribejava-httpclient-ahc) example
- OkHttp (maven module scribejava-httpclient-okhttp) example
- Apache HttpComponents HttpClient (maven module scribejava-httpclient-apache) example
- any externally created HTTP client example
just add corresponding maven modules to your pom
- RFC 6749 The OAuth 2.0 Authorization Framework, Authorization Code Authorization Grant example
- RFC 6749 The OAuth 2.0 Authorization Framework, Client Credentials Authorization Grant example
- RFC 6749 The OAuth 2.0 Authorization Framework, Resource Owner Password Credentials Authorization Grant
- RFC 6750 The OAuth 2.0 Authorization Framework: Bearer Token Usage
- RFC 7636 Proof Key for Code Exchange by OAuth Public Clients (PKCE) example
- RFC 7009 OAuth 2.0 Token Revocation example
- Automatic (https://www.automatic.com/) example
- AWeber (http://www.aweber.com/) example
- Box (https://www.box.com/) example
- Dataporten (https://docs.dataporten.no/) example
- Digg (http://digg.com/) example
- Discord (https://discordapp.com/) example
- Доктор на работе (https://www.doktornarabote.ru/)
- Etsy (https://www.etsy.com/) example
- Facebook (https://www.facebook.com/) example, example with Async Apache HTTP client, example with Async Ning HTTP client
- Fitbit (https://www.fitbit.com/) example
- Flickr (https://www.flickr.com/) example
- Foursquare (https://foursquare.com/) example, example
- Frappe (https://github.com/frappe/frappe) example
- Freelancer (https://www.freelancer.com/) example
- Genius (http://genius.com/) example
- GitHub (https://github.com/) example, example with OkHttp HTTP client
- Google (https://www.google.com/) example, example with Async Http Client, example Revoke, example with PKCEE
- HeadHunter ХэдХантер (https://hh.ru/) example
- HiOrg-Server (https://www.hiorg-server.de/) example
- Imgur (http://imgur.com/) example
- Kaixin 开心网 (http://www.kaixin001.com/) example
- Keycloak (https://www.keycloak.org/) example
- LinkedIn (https://www.linkedin.com/) example, example, example with custom scopes
- Mail.Ru (https://mail.ru/) example, example with Async Ning HTTP Client
- MediaWiki (https://www.mediawiki.org/) example
- Meetup (http://www.meetup.com/) example
- Microsoft Azure Active Directory (Azure AD) (http://azure.microsoft.com/) example
- Microsoft Azure Active Directory (Azure AD) 2.0 (http://azure.microsoft.com/) example
- Microsoft Live (https://login.live.com/) example
- Misfit (http://misfit.com/) example
- NAVER (http://www.naver.com/) example
- Odnoklassniki Одноклассники (http://ok.ru/) example
- Pinterest (https://www.pinterest.com/) example
- 500px (https://500px.com/) example
- Renren (http://renren.com/) example
- Salesforce (https://www.salesforce.com/) example, example with Async Ning HTTP Client
- Sina (http://www.sina.com.cn/ http://weibo.com/login.php) example, example
- Skyrock (http://skyrock.com/) example
- StackExchange (http://stackexchange.com/) example
- The Things Network (v1-staging and v2-preview) (https://www.thethingsnetwork.org/) example v1, example v2 preview
- Trello (https://trello.com/) example
- Tumblr (https://www.tumblr.com/) example
- TUT.BY (http://www.tut.by/) example
- Twitter (https://twitter.com/) example
- uCoz (https://www.ucoz.com/) example
- Viadeo (http://viadeo.com/) example
- VK ВКонтакте (http://vk.com/) example, example Client Credentials Grant, example with External HTTP Client
- Wunderlist (https://www.wunderlist.com/) example
- XING (https://www.xing.com/) example
- Yahoo (https://www.yahoo.com/) example, example
- check the examples folder
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
Works out of the box with android(TM) applications.
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.
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>6.2.0</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>6.2.0</version>
</dependency>
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).
Feel free to drop us an email or create issue right here on github.com
If you have a useful fork that should be listed there please contact us