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.
There is no way to use OkHttpClient with Java 6. Commit to force use Java 7
so there are only two options:
upgrade to java 7 or later
replace OkHttpClient and re-implement same logic with other http client, such as Apache HttpClient