简体   繁体   中英

Authenticate with OAuth2 and OkHttp3

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM