Authenticate with OAuth2 and OkHttp3

Viewed 205

I am looking to extend Apache Drill's ability to query REST APIs such that it can query APIs that use OAuth 2.0 authentication. We currently use okhttp3 to make all the REST calls. (https://github.com/apache/drill/tree/master/contrib/storage-http)

I understand that this is possible using Interceptors but I'm not that familiar with OAuth 2.0 and I'm sure that someone has done this. Are there any tutorials or example code that I could use to implement this?

Thanks!

1 Answers

For anyone who is curious, I got this to work. Here's a link to the PR 1. Take a look in the /contrib/storage-http/oauth folder.

Related