getting bearer token(OAUTH 2.0 ) using java 6

437 Views Asked by At

We have got the bearer token using java 8 codes (OkHttpClient also used oinside).

But we have to do the same in java 6. OkHttpClient will not supports java 8. Is there any other corresponding ways oAuth 2.0 works with java 6 ?

please share your suggestions.

1

There are 1 best solutions below

0
On

There is no way to use OkHttpClient with Java 6. Commit to force use Java 7

so there are only two options:

  1. upgrade to java 7 or later

  2. replace OkHttpClient and re-implement same logic with other http client, such as Apache HttpClient