ScribeJava Async OkHttp Client support

The best OAuth library out there

License

License

MIT
Categories

Categories

CLI User Interface
GroupId

GroupId

com.github.scribejava
ArtifactId

ArtifactId

scribejava-httpclient-okhttp
Last Version

Last Version

8.3.1
Release Date

Release Date

Type

Type

jar
Description

Description

ScribeJava Async OkHttp Client support
The best OAuth library out there

Download scribejava-httpclient-okhttp

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.scribejava/scribejava-httpclient-okhttp/ -->
<dependency>
    <groupId>com.github.scribejava</groupId>
    <artifactId>scribejava-httpclient-okhttp</artifactId>
    <version>8.3.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.scribejava/scribejava-httpclient-okhttp/
implementation 'com.github.scribejava:scribejava-httpclient-okhttp:8.3.1'
// https://jarcasting.com/artifacts/com.github.scribejava/scribejava-httpclient-okhttp/
implementation ("com.github.scribejava:scribejava-httpclient-okhttp:8.3.1")
'com.github.scribejava:scribejava-httpclient-okhttp:jar:8.3.1'
<dependency org="com.github.scribejava" name="scribejava-httpclient-okhttp" rev="8.3.1">
  <artifact name="scribejava-httpclient-okhttp" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.scribejava', module='scribejava-httpclient-okhttp', version='8.3.1')
)
libraryDependencies += "com.github.scribejava" % "scribejava-httpclient-okhttp" % "8.3.1"
[com.github.scribejava/scribejava-httpclient-okhttp "8.3.1"]

Dependencies

compile (3)

Group / Artifact Type Version
com.github.scribejava : scribejava-core jar 8.3.1
com.squareup.okhttp3 : okhttp jar 4.9.1
com.fasterxml.jackson.core : jackson-databind jar 2.12.3

test (3)

Group / Artifact Type Version
com.github.scribejava : scribejava-core test-jar 8.3.1
junit : junit jar 4.13.2
com.squareup.okhttp3 : mockwebserver jar 4.9.1

Project Modules

There are no modules declared in this project.

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

Donate Maven Central

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_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 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

Supports all (50+) 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>8.3.1</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>8.3.1</version>
</dependency>

How can I help ScribeJava

First of all, Pull Requests are welcome, the second option is donations.

When will ScribeJava support XXX (new RFC, custom functionality, new API etc.)

When you will send the pull request. That's the way for a majority of changes here. Or you can ask someone to make the paid job for you. In some cases, when I'm interested in changes (technically or financially), I can implement the request myself.

Paid consulting

If you or your business depends on the Scribejava and you need any specific improvement or new feature not currently implemented in the Scribejava, consider contacting me about a paid job.

Getting started in less than 2 minutes

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

Some useful info and answers you can find on the wiki

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

com.github.scribejava

Scribe Java (OAuth library)

Versions

Version
8.3.1
8.3.0
8.2.0
8.1.0
8.0.0
7.1.1
7.0.0
6.9.0
6.8.1
6.8.0
6.7.0
6.6.3
6.6.2
6.5.1
6.5.0
6.4.1
6.3.0
6.2.0
6.1.0
6.0.0
5.6.0
5.5.0
5.4.0
5.3.0
5.2.0-java7again
5.1.0
5.0.0
4.2.0
4.1.2
4.1.1
4.1.0
4.0.0
3.4.1
3.4.0