Scribejava
Simple OAuth library for Java
Install / Use
/learn @scribejava/ScribejavaREADME
Welcome to the home of ScribeJava, the simple OAuth client 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(YOUR_CLIENT_ID)
.apiSecret(YOUR_CLIENT_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 executable examples are here Common usage: example
Threadsafe
Hit ScribeJava as hard and with many threads as you like.
Java 7 compatible
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
Async and other HTTP clients
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
- Armeria HTTP client (required >= java 8) example
- any externally created HTTP client example
just add corresponding maven modules to your pom
Supports many flows and additional features
- RFC 6749 The OAuth 2.0 Authorization Framework, Authorization Code Authorization Grant, example
- RFC 6749 The OAuth 2.0 Authorization Framework, Resource Owner Password Credentials Authorization Grant
- RFC 6749 The OAuth 2.0 Authorization Framework, Client Credentials Authorization Grant, example
- RFC 6749 The OAuth 2.0 Authorization Framework, Refreshing an Access Token, example
- 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
- RFC 8628 OAuth 2.0 Device Authorization Grant example
- RFC 5849 The OAuth 1.0 Protocol, example
Supports all (50+) major 1.0a and 2.0 OAuth APIs out-of-the-box
- Asana (https://asana.com/) 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/)
- Dropbox (https://www.dropbox.com/) example
- 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](https://github.com/scribejava/scribejava/blob/master/scribejava-apis/src/test/java/com/github/scribejava/apis/examples/Google20WithPKCEExample

