r.example.com/token")) .setClientAuthentication(new BasicAuthentication("s6BhdRkqt3", "7Fjfp0ZBr1KtDRbnfVdmIw")) .build() .setFromTokenResponse(tokenResponse); }
If you need to persist the access token in a data store, use {@link CredentialStore} and{@link Builder#addRefreshListener(CredentialRefreshListener)}.
If you have a custom request initializer, request execute interceptor, or unsuccessful response handler, take a look at the sample usage for {@link HttpExecuteInterceptor} and{@link HttpUnsuccessfulResponseHandler}, which are interfaces that this class also implements.
@since 1.7
@author Yaniv Inbar